mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 22:35:24 +00:00
@@ -758,7 +758,8 @@ proc liftCapturedVars(n: PNode; owner: PSym; d: DetectionPass;
|
||||
# transform, let's not touch the LHS in order to make the lifting pass
|
||||
# correct when `result` is lifted
|
||||
n[0].sons[1] = liftCapturedVars(n[0].sons[1], owner, d, c)
|
||||
else: assert n[0].kind == nkEmpty
|
||||
else:
|
||||
n.sons[0] = liftCapturedVars(n[0], owner, d, c)
|
||||
else:
|
||||
if owner.isIterator:
|
||||
if nfLL in n.flags:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
discard """
|
||||
output: '''true'''
|
||||
output: '''true
|
||||
(999, 0)'''
|
||||
"""
|
||||
|
||||
|
||||
@@ -52,3 +53,11 @@ block tissue1911:
|
||||
proc baz() : int = helper()
|
||||
|
||||
return (bar, baz)
|
||||
|
||||
# bug #11523
|
||||
proc foo(): proc =
|
||||
let a = 999
|
||||
return proc(): (int, int) =
|
||||
return (a, 0)
|
||||
|
||||
echo foo()()
|
||||
Reference in New Issue
Block a user