It's unclear to me why for variables were treated as globals.
This is likely to cause many problems, but in this particular case
it was breaking the unittest/insepectArgs recursive function (the
for loop variable has a different value in each stack frame)
This commit is contained in:
Zahary Karadjov
2013-12-07 21:23:22 +02:00
parent 1e26047c3b
commit 208924b929

View File

@@ -550,9 +550,7 @@ proc evalSym(c: PEvalContext, n: PNode, flags: TEvalFlags): PNode =
of skProc, skConverter, skMacro, skType:
result = n
#result = s.getBody
of skForVar:
result = evalGlobalVar(c, s, flags)
of skVar, skLet, skTemp, skResult:
of skVar, skLet, skForVar, skTemp, skResult:
if sfGlobal notin s.flags:
result = evalVariable(c.tos, s, flags)
else: