fix #715 again
the regression was caused by the introduction of "generic" lambdas
This commit is contained in:
parent
7080d02af4
commit
cf8fe16a48
6 changed files with 29 additions and 4 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue