* fixes #20572

* added a test case
This commit is contained in:
Andreas Rumpf 2022-10-17 23:48:51 +02:00 • committed by GitHub
commit 81087c949f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 116 additions and 70 deletions

View file

@ -306,7 +306,7 @@ proc semGenericStmt(c: PContext, n: PNode,
result.add newIdentNode(getIdent(c.cache, "[]"), n.info)
for i in 0..<n.len: result.add(n[i])
result = semGenericStmt(c, result, flags, ctx)
of nkAsgn, nkFastAsgn:
of nkAsgn, nkFastAsgn, nkSinkAsgn:
checkSonsLen(n, 2, c.config)
let a = n[0]
let b = n[1]