* fix #7405 and #8195

* control pushInfoContext in semExprNoType,genStmts via a new hintExtendedContext; make NotesVerbosity computation more DRY

* addressed comments
This commit is contained in:
Timothee Cour 2018-07-16 04:34:44 -07:00 • committed by Andreas Rumpf
commit d07489abf4
3 changed files with 25 additions and 26 deletions

View file

@ -907,8 +907,11 @@ proc buildEchoStmt(c: PContext, n: PNode): PNode =
result = semExpr(c, result)
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})
discardCheck(c, result)
if isPush: popInfoContext(c.config)
proc isTypeExpr(n: PNode): bool =
case n.kind