summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/prototype/flat/indexed-setters.js
blob: 26b77e03fd79f03a73a19d15a574857f031b8431 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))

// If an indexed Array setter is overridden, TupleSplice shouldn't use it
// when constructing the intermediate array

var z = 5;
print("1111");
Object.defineProperty(Array.prototype, '0', { set: function(y) { z = 42; }});
print("2222");
let newT = #[#[1],#[2,3]].flat();
print("3333");
assertEq(z, 5);
print("4444");

reportCompare(0, 0);