minor breaking change: for loop bodies now get their own scope
This commit is contained in:
parent
eee43e4f8f
commit
4e4d466d06
4 changed files with 14 additions and 0 deletions
|
|
@ -697,7 +697,9 @@ proc semForVars(c: PContext, n: PNode): PNode =
|
|||
if sfGenSym notin v.flags and not isDiscardUnderscore(v):
|
||||
addForVarDecl(c, v)
|
||||
inc(c.p.nestedLoopCounter)
|
||||
openScope(c)
|
||||
n.sons[length-1] = semStmt(c, n.sons[length-1])
|
||||
closeScope(c)
|
||||
dec(c.p.nestedLoopCounter)
|
||||
|
||||
proc implicitIterator(c: PContext, it: string, arg: PNode): PNode =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue