Fix #14911 (#14922) [backport]

* Fix #14911

* Add testcase

* Fix test
This commit is contained in:
Clyybber
2020-07-07 10:21:18 +02:00
committed by GitHub
parent ebd97884a0
commit 5bd2da3f64
2 changed files with 9 additions and 2 deletions

View File

@@ -2432,7 +2432,7 @@ proc checkPar(c: PContext; n: PNode): TParKind =
for i in 0..<n.len:
if result == paTupleFields:
if (n[i].kind != nkExprColonExpr) or
n[i][0].kind notin {nkSym, nkIdent}:
n[i][0].kind notin {nkSym, nkIdent, nkAccQuoted}:
localError(c.config, n[i].info, errNamedExprExpected)
return paNone
else: