fixes regression: constant fac4 didn't work
This commit is contained in:
parent
cc0a32ae87
commit
3be07d842a
4 changed files with 26 additions and 11 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue