summaryrefslogtreecommitdiff
path: root/examples/testif.nya
diff options
context:
space:
mode:
authorNic Gaffney <gaffney_nic@protonmail.com>2025-02-19 18:07:15 -0600
committerNic Gaffney <gaffney_nic@protonmail.com>2025-02-19 18:07:15 -0600
commitfe851bcb542dac5f3af312da02ff617aa817f118 (patch)
tree9f492f460f12e3b31d5add43e8a623fdb5cb4609 /examples/testif.nya
parenteacf9771c53f75a2b4ebe91070a32d5e9a73e524 (diff)
downloadcalico-fe851bcb542dac5f3af312da02ff617aa817f118.tar.gz
Fixed if statements
Diffstat (limited to 'examples/testif.nya')
-rw-r--r--examples/testif.nya9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/testif.nya b/examples/testif.nya
new file mode 100644
index 0000000..c18f34e
--- /dev/null
+++ b/examples/testif.nya
@@ -0,0 +1,9 @@
+fn main() -> i32 {
+ if (6 == 7) {
+ return 1;
+ }
+ if (5 == 5) {
+ return 0;
+ }
+ return 2;
+}