summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-01-11 02:05:22 +0100
committerAraq <rumpf_a@web.de>2015-01-11 02:05:22 +0100
commitba7ef4e30f361d3d9ca827aa2d16b60b469562b9 (patch)
tree3c2a5409b93da7aba49d78af22d7eddaf2c8c1a0
parent350fbc6aca14f06dab3e2af1c92fcf811b6275ef (diff)
downloadNim-ba7ef4e30f361d3d9ca827aa2d16b60b469562b9.tar.gz
fixes #1903
-rw-r--r--compiler/semstmts.nim3
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: