mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 06:18:51 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user