summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semstmts.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 24c135767..c0c48782e 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -442,6 +442,8 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode =
       var v = semIdentDef(c, a.sons[j], symkind)
       if sfGenSym notin v.flags and
          not isDiscardUnderscore(a.sons[j]): addInterfaceDecl(c, v)
+      if isDiscardUnderscore(a.sons[j]):
+        v.flags.incl(sfGenSym)
       when oKeepVariableNames:
         if c.inUnrolledContext > 0: v.flags.incl(sfShadowed)
         else: