fixes #2134
This commit is contained in:
parent
aef7be2e79
commit
77406dd59c
2 changed files with 34 additions and 1 deletions
|
|
@ -156,7 +156,7 @@ proc semForFields(c: PContext, n: PNode, m: TMagic): PNode =
|
|||
dec(c.p.nestedLoopCounter)
|
||||
# for TR macros this 'while true: ...; break' loop is pretty bad, so
|
||||
# we avoid it now if we can:
|
||||
if hasSonWith(stmts, nkBreakStmt):
|
||||
if containsNode(stmts, {nkBreakStmt}):
|
||||
var b = newNodeI(nkBreakStmt, n.info)
|
||||
b.add(ast.emptyNode)
|
||||
stmts.add(b)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue