summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-02-05 09:41:47 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-02-05 09:41:47 +0100
commite672208b82494cb105c2c21e0604157724bb9816 (patch)
treeacf21b724678c9c27f2e930ebba08ae84e7889d0
parentc4dd9dc77e36eed0a71bf7b5d983d9de8e2e19e4 (diff)
downloadNim-e672208b82494cb105c2c21e0604157724bb9816.tar.gz
fixes #5221
-rw-r--r--compiler/vmgen.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim
index 9460f1809..125fe8ae0 100644
--- a/compiler/vmgen.nim
+++ b/compiler/vmgen.nim
@@ -1510,7 +1510,7 @@ proc genVarSection(c: PCtx; n: PNode) =
     #assert(a.sons[0].kind == nkSym) can happen for transformed vars
     if a.kind == nkVarTuple:
       for i in 0 .. a.len-3:
-        setSlot(c, a[i].sym)
+        if not a[i].sym.isGlobal: setSlot(c, a[i].sym)
         checkCanEval(c, a[i])
       c.gen(lowerTupleUnpacking(a, c.getOwner))
     elif a.sons[0].kind == nkSym: