When in object handles procedure call again, fixes #22474 (#22480)

Ping @narimiran please backport to the 2.0 line.

(cherry picked from commit 6c4e7835bf)
This commit is contained in:
Jason Beetham
2023-08-15 09:48:31 -06:00
committed by narimiran
parent ba5d873f63
commit 60dc41a5e4
2 changed files with 33 additions and 1 deletions

View File

@@ -200,7 +200,7 @@ proc hasValuelessStatics(n: PNode): bool =
a
proc doThing(_: MyThing)
]#
if n.safeLen == 0:
if n.safeLen == 0 and n.kind != nkEmpty: # Some empty nodes can get in here
n.typ == nil or n.typ.kind == tyStatic
else:
for x in n: