summary refs log tree commit diff stats
path: root/tests/exprs/tstmtexprs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-02-06 02:41:53 +0100
committerAraq <rumpf_a@web.de>2014-02-06 02:41:53 +0100
commit3be07d842a13cde69aeb5e7908ed62907daef4f7 (patch)
treeadcd1cc8c57777704ef3625ac2534dbeb7a51dfd /tests/exprs/tstmtexprs.nim
parentcc0a32ae87469fe30c8c81461cc8c7170f92c8cf (diff)
downloadNim-3be07d842a13cde69aeb5e7908ed62907daef4f7.tar.gz
fixes regression: constant fac4 didn't work
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)