summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-05-11 18:16:25 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-05-11 18:16:25 +0200
commit299351a909ee4827984eb9390f8ed55437bd60a9 (patch)
treedf4edb5dd8c009e15b22144c314eb80d36916aa2 /compiler
parent95ffeb6079bb9232fc7c1ff4fea98da37d54ef42 (diff)
downloadNim-299351a909ee4827984eb9390f8ed55437bd60a9.tar.gz
fixes #4070
Diffstat (limited to 'compiler')
-rw-r--r--compiler/lambdalifting.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim
index 959632bab..753602c80 100644
--- a/compiler/lambdalifting.nim
+++ b/compiler/lambdalifting.nim
@@ -716,6 +716,7 @@ proc liftCapturedVars(n: PNode; owner: PSym; d: DetectionPass;
         #localError(n.info, "internal error: closure to closure created")
         # now we know better, so patch it:
         n.sons[0] = x.sons[0]
+        n.sons[1] = x.sons[1]
   of nkLambdaKinds, nkIteratorDef:
     if n.typ != nil and n[namePos].kind == nkSym:
       let m = newSymNode(n[namePos].sym)