fixes #1903
This commit is contained in:
parent
350fbc6aca
commit
ba7ef4e30f
1 changed files with 2 additions and 1 deletions
|
|
@ -1203,7 +1203,8 @@ proc semStaticStmt(c: PContext, n: PNode): PNode =
|
||||||
proc usesResult(n: PNode): bool =
|
proc usesResult(n: PNode): bool =
|
||||||
# nkStmtList(expr) properly propagates the void context,
|
# nkStmtList(expr) properly propagates the void context,
|
||||||
# so we don't need to process that all over again:
|
# so we don't need to process that all over again:
|
||||||
if n.kind notin {nkStmtList, nkStmtListExpr} + procDefs:
|
if n.kind notin {nkStmtList, nkStmtListExpr,
|
||||||
|
nkMacroDef, nkTemplateDef} + procDefs:
|
||||||
if isAtom(n):
|
if isAtom(n):
|
||||||
result = n.kind == nkSym and n.sym.kind == skResult
|
result = n.kind == nkSym and n.sym.kind == skResult
|
||||||
elif n.kind == nkReturnStmt:
|
elif n.kind == nkReturnStmt:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue