| 1 |
// Copyright (C) 2015 André Bargull. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
es6id: 25.4.4.1.1 |
| 6 |
description: > |
| 7 |
Indexed setter properties on Array.prototype are not invoked. |
| 8 |
info: | |
| 9 |
Runtime Semantics: PerformPromiseAll( iteratorRecord, constructor, resultCapability) |
| 10 |
|
| 11 |
... |
| 12 |
4. Let remainingElementsCount be a new Record { [[value]]: 1 }. |
| 13 |
... |
| 14 |
6.d ... |
| 15 |
ii. Set remainingElementsCount.[[value]] to remainingElementsCount.[[value]] − 1. |
| 16 |
iii. If remainingElementsCount.[[value]] is 0, |
| 17 |
1. Let valuesArray be CreateArrayFromList(values). |
| 18 |
... |
| 19 |
... |
| 20 |
|
| 21 |
7.3.16 CreateArrayFromList (elements) |
| 22 |
... |
| 23 |
4. For each element e of elements |
| 24 |
a. Let status be CreateDataProperty(array, ToString(n), e). |
| 25 |
b. Assert: status is true. |
| 26 |
... |
| 27 |
flags: [async] |
| 28 |
---*/ |
| 29 |
|
| 30 |
Object.defineProperty(Array.prototype, 0, { |
| 31 |
set: function() { |
| 32 |
$ERROR("Setter on Array.prototype called"); |
| 33 |
} |
| 34 |
}); |
| 35 |
|
| 36 |
Promise.all([42]).then(function() { |
| 37 |
$DONE(); |
| 38 |
}, $DONE); |