fixes #9076
This commit is contained in:
parent
3d768738f8
commit
787687727a
3 changed files with 26 additions and 2 deletions
|
|
@ -114,7 +114,7 @@ const
|
|||
skipForDiscardable = {nkIfStmt, nkIfExpr, nkCaseStmt, nkOfBranch,
|
||||
nkElse, nkStmtListExpr, nkTryStmt, nkFinally, nkExceptBranch,
|
||||
nkElifBranch, nkElifExpr, nkElseExpr, nkBlockStmt, nkBlockExpr,
|
||||
nkHiddenStdConv}
|
||||
nkHiddenStdConv, nkHiddenDeref}
|
||||
|
||||
proc implicitlyDiscardable(n: PNode): bool =
|
||||
var n = n
|
||||
|
|
@ -601,6 +601,8 @@ proc semForVars(c: PContext, n: PNode; flags: TExprFlags): PNode =
|
|||
inc(c.p.nestedLoopCounter)
|
||||
openScope(c)
|
||||
n.sons[length-1] = semExprBranch(c, n.sons[length-1], flags)
|
||||
if efInTypeof notin flags:
|
||||
discardCheck(c, n.sons[length-1], flags)
|
||||
closeScope(c)
|
||||
dec(c.p.nestedLoopCounter)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue