revert discardable transformation (#10905)
* Revert "Properly wrap discarded statements (#10322)"
This reverts commit 15584879b9.
* add test for implicit discard after defer
* enable t10241 again
* make C++ tests green again
This commit is contained in:
parent
88079a0dee
commit
fabc2a7086
6 changed files with 113 additions and 41 deletions
|
|
@ -937,7 +937,7 @@ proc semExprNoType(c: PContext, n: PNode): PNode =
|
|||
let isPush = hintExtendedContext in c.config.notes
|
||||
if isPush: pushInfoContext(c.config, n.info)
|
||||
result = semExpr(c, n, {efWantStmt})
|
||||
result = discardCheck(c, result, {})
|
||||
discardCheck(c, result, {})
|
||||
if isPush: popInfoContext(c.config)
|
||||
|
||||
proc isTypeExpr(n: PNode): bool =
|
||||
|
|
@ -1673,7 +1673,7 @@ proc semProcBody(c: PContext, n: PNode): PNode =
|
|||
a.sons[1] = result
|
||||
result = semAsgn(c, a)
|
||||
else:
|
||||
result = discardCheck(c, result, {})
|
||||
discardCheck(c, result, {})
|
||||
|
||||
if c.p.owner.kind notin {skMacro, skTemplate} and
|
||||
c.p.resultSym != nil and c.p.resultSym.typ.isMetaType:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue