summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arrays/bug1673221.js
blob: 497c4befecfb5e5013e8c68cc089d1c80993e578 (plain)
1
2
3
4
5
let x = [7];
x.splice(0, {valueOf() { x.length = 2; return 0; }}, 5);
assertEq(x.length, 2);
assertEq(x[0], 5);
assertEq(x[1], 7);