fixes regression: constant fac4 didn't work

This commit is contained in:
Araq
2014-02-06 02:41:53 +01:00
parent cc0a32ae87
commit 3be07d842a
4 changed files with 26 additions and 11 deletions

View File

@@ -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)