fixes #708
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:
parent
1e26047c3b
commit
208924b929
1 changed files with 1 additions and 3 deletions
|
|
@ -550,9 +550,7 @@ proc evalSym(c: PEvalContext, n: PNode, flags: TEvalFlags): PNode =
|
||||||
of skProc, skConverter, skMacro, skType:
|
of skProc, skConverter, skMacro, skType:
|
||||||
result = n
|
result = n
|
||||||
#result = s.getBody
|
#result = s.getBody
|
||||||
of skForVar:
|
of skVar, skLet, skForVar, skTemp, skResult:
|
||||||
result = evalGlobalVar(c, s, flags)
|
|
||||||
of skVar, skLet, skTemp, skResult:
|
|
||||||
if sfGlobal notin s.flags:
|
if sfGlobal notin s.flags:
|
||||||
result = evalVariable(c.tos, s, flags)
|
result = evalVariable(c.tos, s, flags)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue