summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2015-04-23 00:29:16 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2015-04-23 00:29:16 +0100
commitf0f0062a5d37614b552c4ecc40ba2a189b00b008 (patch)
treeb400b62d3383c3c91ea7aa46f7719e3efd6da9ec /compiler
parent9e69e4e078466886565565d6763b1e4794ea0670 (diff)
downloadNim-f0f0062a5d37614b552c4ecc40ba2a189b00b008.tar.gz
Add sfGenSym for (_).
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: