diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2015-12-29 01:59:36 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2015-12-29 01:59:36 +0100 |
commit | 870b03707b17819defec79149cc3748d15ef57e4 (patch) | |
tree | 073d1833aece4fde2a914a4d966466ac097254ec | |
parent | 57149a47947cb9f8efc9addff9c92a0c39baa6ff (diff) | |
download | Nim-870b03707b17819defec79149cc3748d15ef57e4.tar.gz |
bootstrapping works again
-rw-r--r-- | compiler/lambdalifting.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim index b7af99c3e..4ccaadc0d 100644 --- a/compiler/lambdalifting.nim +++ b/compiler/lambdalifting.nim @@ -608,8 +608,10 @@ proc liftCapturedVars(n: PNode; owner: PSym; d: DetectionPass; of nkProcDef, nkMethodDef, nkConverterDef, nkMacroDef: discard of nkLambdaKinds, nkIteratorDef: - if n.typ != nil: - discard liftCapturedVars(n[namePos], owner, d, c) + if n.typ != nil and n[namePos].kind == nkSym: + let m = newSymNode(n[namePos].sym) + m.typ = n.typ + result = liftCapturedVars(m, owner, d, c) else: if owner.isIterator and n.kind == nkYieldStmt: result = transformYield(n, owner, d, c) |