| 1 |
// This file was procedurally generated from the following sources: |
| 2 |
// - src/spread/mult-obj-ident.case |
| 3 |
// - src/spread/default/super-call.template |
| 4 |
/*--- |
| 5 |
description: Object Spread operator following other properties (SuperCall) |
| 6 |
esid: sec-super-keyword-runtime-semantics-evaluation |
| 7 |
es6id: 12.3.5.1 |
| 8 |
features: [object-spread] |
| 9 |
flags: [generated] |
| 10 |
includes: [propertyHelper.js] |
| 11 |
info: | |
| 12 |
SuperCall : super Arguments |
| 13 |
|
| 14 |
1. Let newTarget be GetNewTarget(). |
| 15 |
2. If newTarget is undefined, throw a ReferenceError exception. |
| 16 |
3. Let func be GetSuperConstructor(). |
| 17 |
4. ReturnIfAbrupt(func). |
| 18 |
5. Let argList be ArgumentListEvaluation of Arguments. |
| 19 |
[...] |
| 20 |
|
| 21 |
Pending Runtime Semantics: PropertyDefinitionEvaluation |
| 22 |
|
| 23 |
PropertyDefinition:...AssignmentExpression |
| 24 |
|
| 25 |
1. Let exprValue be the result of evaluating AssignmentExpression. |
| 26 |
2. Let fromValue be GetValue(exprValue). |
| 27 |
3. ReturnIfAbrupt(fromValue). |
| 28 |
4. Let excludedNames be a new empty List. |
| 29 |
5. Return CopyDataProperties(object, fromValue, excludedNames). |
| 30 |
|
| 31 |
---*/ |
| 32 |
let o = {c: 3, d: 4}; |
| 33 |
|
| 34 |
|
| 35 |
var callCount = 0; |
| 36 |
|
| 37 |
class Test262ParentClass { |
| 38 |
constructor(obj) { |
| 39 |
assert.sameValue(Object.keys(obj).length, 4); |
| 40 |
|
| 41 |
verifyProperty(obj, "a", { |
| 42 |
enumerable: true, |
| 43 |
writable: true, |
| 44 |
configurable: true, |
| 45 |
value: 1 |
| 46 |
}); |
| 47 |
|
| 48 |
verifyProperty(obj, "b", { |
| 49 |
enumerable: true, |
| 50 |
writable: true, |
| 51 |
configurable: true, |
| 52 |
value: 2 |
| 53 |
}); |
| 54 |
|
| 55 |
verifyProperty(obj, "c", { |
| 56 |
enumerable: true, |
| 57 |
writable: true, |
| 58 |
configurable: true, |
| 59 |
value: 3 |
| 60 |
}); |
| 61 |
|
| 62 |
verifyProperty(obj, "d", { |
| 63 |
enumerable: true, |
| 64 |
writable: true, |
| 65 |
configurable: true, |
| 66 |
value: 4 |
| 67 |
}); |
| 68 |
callCount += 1; |
| 69 |
} |
| 70 |
} |
| 71 |
|
| 72 |
class Test262ChildClass extends Test262ParentClass { |
| 73 |
constructor() { |
| 74 |
super({a: 1, b: 2, ...o}); |
| 75 |
} |
| 76 |
} |
| 77 |
|
| 78 |
new Test262ChildClass(); |
| 79 |
assert.sameValue(callCount, 1); |