fixed tuples in a static context; preparations for correct compile time evaluation of integral ops

This commit is contained in:
Araq 2014-03-22 02:52:06 +01:00
commit e53fc91282
5 changed files with 30 additions and 4 deletions

View file

@ -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: