opencode/packages/codemode-rust/conformance/cases/std-array-index-boundary.js
kommander e10ecb8811 fix(codemode): read 2^32 - 1 and above on an array as plain keys
An array's numeric read took any integer as an element index, so a[2 ** 32 -
1], which is stored as a plain property, read through to the prototypes
and came back undefined. Only indexes below 2^32 - 1 are elements, as the
writes already knew. Touches ops.rs (get_elem).

Two test262 files leave rust-skipped.txt.
2026-11-18 18:56:11 +01:00

1 line
161 B
JavaScript

const a = []; a[4294967295] = "x"; a[4294967296] = "y"; a["-1"] = "z"; return [a.length, a[4294967295], a[4294967296], a[-1], Object.keys(a), JSON.stringify(a)]