summary refs log tree commit diff stats
path: root/tests/parser/tifexprs.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/parser/tifexprs.nim')
-rw-r--r--tests/parser/tifexprs.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/parser/tifexprs.nim b/tests/parser/tifexprs.nim
new file mode 100644
index 000000000..3a7e2bddc
--- /dev/null
+++ b/tests/parser/tifexprs.nim
@@ -0,0 +1,12 @@
+discard """
+  output: '''
+1
+'''
+"""
+
+var a, b: int
+let x = if a > b:
+    0
+    else: 1
+
+echo x