This commit is contained in:
Araq
2015-01-11 02:05:22 +01:00
parent 350fbc6aca
commit ba7ef4e30f

View File

@@ -1203,7 +1203,8 @@ proc semStaticStmt(c: PContext, n: PNode): PNode =
proc usesResult(n: PNode): bool =
# nkStmtList(expr) properly propagates the void context,
# 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):
result = n.kind == nkSym and n.sym.kind == skResult
elif n.kind == nkReturnStmt: