crates/perry/tests/issue_10058_push_spread_scaling.rs::spread_push_is_iterator_correct_and_gc_safe_on_reused_destinations fails on main. It reproduces on cab6d62 and on PR #11680's head. Main's CI skips the cargo-test-perry shards, so the failure doesn't show there.
Cause. The fixture assigns Array.prototype[Symbol.iterator]. The prototype-patch pre-scan from #11394 (c9a5efe, perry-hir/src/patched_builtins.rs) records a computed key as "any member", so it also treats push as patched. Every arr.push(...src) then goes through the generic patched-prototype call (js_array_like_to_array + js_array_concat + js_native_call_method_patched_proto_apply). That path copies the source as an array and never runs its iterator.
Effect. This is a correctness bug, not only a stale assertion: Perry prints own 4 6,1,2,3 where Node prints own 3 6,7,8.
Related, older bug. Even with no prototype patch, f(...own) and o.m(...own) ignore an own Symbol.iterator: Perry prints 1,2,3 where Node prints 7,8.
crates/perry/tests/issue_10058_push_spread_scaling.rs::spread_push_is_iterator_correct_and_gc_safe_on_reused_destinationsfails on main. It reproduces on cab6d62 and on PR #11680's head. Main's CI skips thecargo-test-perryshards, so the failure doesn't show there.Cause. The fixture assigns
Array.prototype[Symbol.iterator]. The prototype-patch pre-scan from #11394 (c9a5efe,perry-hir/src/patched_builtins.rs) records a computed key as "any member", so it also treatspushas patched. Everyarr.push(...src)then goes through the generic patched-prototype call (js_array_like_to_array+js_array_concat+js_native_call_method_patched_proto_apply). That path copies the source as an array and never runs its iterator.Effect. This is a correctness bug, not only a stale assertion: Perry prints
own 4 6,1,2,3where Node printsown 3 6,7,8.Related, older bug. Even with no prototype patch,
f(...own)ando.m(...own)ignore an ownSymbol.iterator: Perry prints1,2,3where Node prints7,8.