Add sfGenSym for (_).

This commit is contained in:
Dominik Picheta
2015-04-23 00:29:16 +01:00
parent 9e69e4e078
commit f0f0062a5d
2 changed files with 22 additions and 12 deletions

View File

@@ -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: