summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/prototype/map/indexed-setters.js
blob: 774f1dc34935ca8eef81ae7fdaa5b71361f7b42b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))

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

z = 5;
Object.defineProperty(Array.prototype, '0', { set: function(y) { z = 42; }});
newT = #[1,2,3].map(x => x*x);
assertEq(z, 5);

reportCompare(0, 0);