mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-25 16:53:59 +00:00
fixes regression: constant fac4 didn't work
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user