diff options
author | Araq <rumpf_a@web.de> | 2015-01-11 02:05:22 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-01-11 02:05:22 +0100 |
commit | ba7ef4e30f361d3d9ca827aa2d16b60b469562b9 (patch) | |
tree | 3c2a5409b93da7aba49d78af22d7eddaf2c8c1a0 | |
parent | 350fbc6aca14f06dab3e2af1c92fcf811b6275ef (diff) | |
download | Nim-ba7ef4e30f361d3d9ca827aa2d16b60b469562b9.tar.gz |
fixes #1903
-rw-r--r-- | compiler/semstmts.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index bdff15926..44f14afd8 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -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: |