summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/prototype/toReversed/indexed-setters.js
blob: a2477d37e30761f83612daecd3ed5d400bc3b656 (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].toReversed();
print("3333");
assertEq(z, 5);
print("4444");

reportCompare(0, 0);