This commit is contained in:
Andreas Rumpf 2018-04-14 15:44:05 +02:00
commit a30b52eb64

View file

@ -400,7 +400,7 @@ proc exprColonEqExprListAux(p: var TParser, endTok: TTokType, result: PNode) =
if p.tok.tokType != tkComma: break if p.tok.tokType != tkComma: break
getTok(p) getTok(p)
# (1,) produces a tuple expression # (1,) produces a tuple expression
if endTok == tkParRi and p.tok.tokType == tkParRi: if endTok == tkParRi and p.tok.tokType == tkParRi and result.kind == nkPar:
result.kind = nkTupleConstr result.kind = nkTupleConstr
skipComment(p, a) skipComment(p, a)
optPar(p) optPar(p)