When unpacking tuples in var/let declarations a part of the tuple can now
be discarded using a single underscore.
This commit is contained in:
Dominik Picheta 2015-03-31 00:39:23 +01:00
commit b38eb2e2a8
8 changed files with 39 additions and 6 deletions

View file

@ -403,7 +403,8 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode =
for j in countup(0, length-3):
var v = semIdentDef(c, a.sons[j], symkind)
if sfGenSym notin v.flags: addInterfaceDecl(c, v)
if sfGenSym notin v.flags and
a.sons[j].kind != nkUnderscore: addInterfaceDecl(c, v)
when oKeepVariableNames:
if c.inUnrolledContext > 0: v.flags.incl(sfShadowed)
else: