summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/from/indexed-setters.js
blob: 90aa5be1cb9901f297a93d5da6aceaefd8048cb9 (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 = Tuple.from([1, 2, 3]);
assertEq(z, 5);

reportCompare(0, 0);