summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/parser.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim
index c8edd5136..0019b7acb 100644
--- a/compiler/parser.nim
+++ b/compiler/parser.nim
@@ -400,7 +400,7 @@ proc exprColonEqExprListAux(p: var TParser, endTok: TTokType, result: PNode) =
     if p.tok.tokType != tkComma: break
     getTok(p)
     # (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
     skipComment(p, a)
   optPar(p)