summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSimon Hafner <hafnersimon@gmail.com>2015-03-11 19:21:27 -0500
committerSimon Hafner <hafnersimon@gmail.com>2015-03-11 19:21:27 -0500
commit8993c7672d90eb78e0453cd6245570b19be5fa01 (patch)
treef44269a537c4b92893e6b71f91ff76514584df38
parent1a98de87122dafd483dcc402f528633f63bf4508 (diff)
downloadNim-8993c7672d90eb78e0453cd6245570b19be5fa01.tar.gz
do not warn about gensym'd results
-rw-r--r--compiler/semstmts.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index db0b9b67f..19514263f 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -410,7 +410,7 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode =
           let shadowed = findShadowedVar(c, v)
           if shadowed != nil:
             shadowed.flags.incl(sfShadowed)
-            if shadowed.kind == skResult:
+            if shadowed.kind == skResult and sfGenSym notin v.flags:
               message(a.info, warnResultShadowed)
             # a shadowed variable is an error unless it appears on the right
             # side of the '=':