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

This commit is contained in:
ringabout
2024-05-22 20:38:09 +08:00
committed by GitHub
parent 309f97af4c
commit 5cd141cebb

View File

@@ -150,8 +150,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: