diff options
author | Araq <rumpf_a@web.de> | 2014-02-06 02:41:53 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-02-06 02:41:53 +0100 |
commit | 3be07d842a13cde69aeb5e7908ed62907daef4f7 (patch) | |
tree | adcd1cc8c57777704ef3625ac2534dbeb7a51dfd /tests/exprs/tstmtexprs.nim | |
parent | cc0a32ae87469fe30c8c81461cc8c7170f92c8cf (diff) | |
download | Nim-3be07d842a13cde69aeb5e7908ed62907daef4f7.tar.gz |
fixes regression: constant fac4 didn't work
Diffstat (limited to 'tests/exprs/tstmtexprs.nim')
-rw-r--r-- | tests/exprs/tstmtexprs.nim | 7 |
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) |