the regression was caused by the introduction of "generic" lambdas
This commit is contained in:
Zahary Karadjov 2014-03-15 11:23:46 +02:00
commit cf8fe16a48
6 changed files with 29 additions and 4 deletions

View file

@ -1,5 +1,5 @@
discard """
output: "10\n10\n1\n2\n3"
output: "10\n10\n1\n2\n3\n15"
"""
proc test(x: proc (a, b: int): int) =
@ -16,3 +16,8 @@ proc foreach[T](s: seq[T], body: proc(x: T)) =
foreach(@[1,2,3]) do (x):
echo x
proc foo =
let x = proc (a, b: int): auto = a + b
echo x(5, 10)
foo()