* 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

@ -2045,7 +2045,7 @@ proc gen(c: PCtx; n: PNode; dest: var TDest; flags: TGenFlags = {}) =
of nkNilLit:
if not n.typ.isEmptyType: genLit(c, getNullValue(n.typ, n.info, c.config), dest)
else: unused(c, n, dest)
of nkAsgn, nkFastAsgn:
of nkAsgn, nkFastAsgn, nkSinkAsgn:
unused(c, n, dest)
genAsgn(c, n[0], n[1], n.kind == nkAsgn)
of nkDotExpr: genObjAccess(c, n, dest, flags)