mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 10:22:15 +00:00
fixes #1903
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user