summary refs log tree commit diff stats
path: root/tests/exprs/tstmtexprs.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/exprs/tstmtexprs.nim')
-rw-r--r--tests/exprs/tstmtexprs.nim7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/exprs/tstmtexprs.nim b/tests/exprs/tstmtexprs.nim
index 8149ec4b8..816e58cb1 100644
--- a/tests/exprs/tstmtexprs.nim
+++ b/tests/exprs/tstmtexprs.nim
@@ -1,5 +1,6 @@
 discard """
-  output: '''(bar: bar)
+  output: '''24
+(bar: bar)
 1244
 6
 abcdefghijklmnopqrstuvwxyz
@@ -8,6 +9,10 @@ abcdefghijklmnopqrstuvwxyz
 
 import strutils
 
+const fac4 = (var x = 1; for i in 1..4: x *= i; x)
+
+echo fac4
+
 when true:
   proc test(foo: proc (x, y: int): bool) =
     echo foo(5, 5)