summary refs log tree commit diff stats
path: root/compiler/cgen.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-09-18 09:36:16 +0200
committerGitHub <noreply@github.com>2018-09-18 09:36:16 +0200
commitc661f8e1be24a4d3d4b9cf8a544e2a3cdca87593 (patch)
treed65dfc0998432089c8f966c6506e72a376f12477 /compiler/cgen.nim
parent9c6dde1b707b1ccc58c183047ee149a6c70b7e10 (diff)
parentacaf2b8e76e1c3e1a63228bed535b33aa20b0f1d (diff)
downloadNim-c661f8e1be24a4d3d4b9cf8a544e2a3cdca87593.tar.gz
Merge pull request #8983 from cooldome/codegen_crash
Fixes 8979
Diffstat (limited to 'compiler/cgen.nim')
-rw-r--r--compiler/cgen.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim
index 2db92bc21..3040f98da 100644
--- a/compiler/cgen.nim
+++ b/compiler/cgen.nim
@@ -707,7 +707,7 @@ proc containsResult(n: PNode): bool =
     for i in 0..<n.safeLen:
       if containsResult(n[i]): return true
 
-const harmless = {nkConstSection, nkTypeSection, nkEmpty, nkCommentStmt} +
+const harmless = {nkConstSection, nkTypeSection, nkEmpty, nkCommentStmt, nkTemplateDef, nkMacroDef} +
                   declarativeDefs
 
 proc easyResultAsgn(n: PNode): PNode =