parent
9c6d3e26cb
commit
91e9cb64e9
1 changed files with 2 additions and 1 deletions
|
|
@ -349,6 +349,7 @@ proc detectCapturedVars(n: PNode; owner: PSym; c: var DetectionPass) =
|
||||||
|
|
||||||
let innerProc = isInnerProc(s)
|
let innerProc = isInnerProc(s)
|
||||||
if innerProc:
|
if innerProc:
|
||||||
|
if s.isIterator: c.somethingToDo = true
|
||||||
if not c.processed.containsOrIncl(s.id):
|
if not c.processed.containsOrIncl(s.id):
|
||||||
detectCapturedVars(s.getBody, s, c)
|
detectCapturedVars(s.getBody, s, c)
|
||||||
let ow = s.skipGenericOwner
|
let ow = s.skipGenericOwner
|
||||||
|
|
@ -762,7 +763,7 @@ proc liftLambdas*(fn: PSym, body: PNode; tooEarly: var bool): PNode =
|
||||||
result = wrapIterBody(newBody, fn)
|
result = wrapIterBody(newBody, fn)
|
||||||
else:
|
else:
|
||||||
result = body
|
result = body
|
||||||
#if fn.name.s == "tokenize2":
|
#if fn.name.s == "get2":
|
||||||
# echo "had something to do ", d.somethingToDo
|
# echo "had something to do ", d.somethingToDo
|
||||||
# echo renderTree(result, {renderIds})
|
# echo renderTree(result, {renderIds})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue