diff options
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r-- | compiler/semstmts.nim | 2 |
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 '=': |