Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/super/call-spread-sngl-obj-ident.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/spread/sngl-obj-ident.case
3 // - src/spread/default/super-call.template
4 /*---
5 description: Object Spread operator without other arguments (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, 2);
40
41 verifyProperty(obj, "c", {
42 enumerable: true,
43 writable: true,
44 configurable: true,
45 value: 3
46 });
47
48 verifyProperty(obj, "d", {
49 enumerable: true,
50 writable: true,
51 configurable: true,
52 value: 4
53 });
54 callCount += 1;
55 }
56 }
57
58 class Test262ChildClass extends Test262ParentClass {
59 constructor() {
60 super({...o});
61 }
62 }
63
64 new Test262ChildClass();
65 assert.sameValue(callCount, 1);