Fixes 8979

This commit is contained in:
Andrii Riabushenko 2018-09-16 21:33:21 +01:00
commit acaf2b8e76
2 changed files with 35 additions and 2 deletions

View file

@ -705,7 +705,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 =