summary refs log tree commit diff stats
path: root/compiler/vmgen.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-03-22 02:52:06 +0100
committerAraq <rumpf_a@web.de>2014-03-22 02:52:06 +0100
commite53fc91282bc8a5dabc4f12e041fa6ce5400c007 (patch)
treebe7fcdd03635a91596ab813643f3b293db7d30e8 /compiler/vmgen.nim
parentfb5ece805ff5b752ec2e9dc0c49fc34d5abdc6a9 (diff)
downloadNim-e53fc91282bc8a5dabc4f12e041fa6ce5400c007.tar.gz
fixed tuples in a static context; preparations for correct compile time evaluation of integral ops
Diffstat (limited to 'compiler/vmgen.nim')
-rw-r--r--compiler/vmgen.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim
index 0fc71189d..5e51ecf4c 100644
--- a/compiler/vmgen.nim
+++ b/compiler/vmgen.nim
@@ -1226,7 +1226,8 @@ proc genVarSection(c: PCtx; n: PNode) =
         if s.position == 0:
           if sfImportc in s.flags: c.importcSym(a.info, s)
           else:
-            let sa = if s.ast.isNil: getNullValue(s.typ, a.info) else: s.ast
+            let sa = if s.ast.isNil: getNullValue(s.typ, a.info) 
+                     else: canonConst(s.ast)
             c.globals.add(sa)
             s.position = c.globals.len
         if a.sons[2].kind == nkEmpty: