fixes reifiedOpenArray; nkHiddenStdConv is PathKinds1 not PathKinds0 (#23633)

(cherry picked from commit 5cd141cebb)
This commit is contained in:
ringabout
2024-05-22 20:38:09 +08:00
committed by narimiran
parent 8d254a5945
commit c2b4d8a968

View File

@@ -154,8 +154,14 @@ proc genBoundsCheck(p: BProc; arr, a, b: TLoc)
proc reifiedOpenArray(n: PNode): bool {.inline.} =
var x = n
while x.kind in {nkAddr, nkHiddenAddr, nkHiddenStdConv, nkHiddenDeref}:
x = x[0]
while true:
case x.kind
of {nkAddr, nkHiddenAddr, nkHiddenDeref}:
x = x[0]
of nkHiddenStdConv:
x = x[1]
else:
break
if x.kind == nkSym and x.sym.kind == skParam:
result = false
else: