tests/auto/qml/ecmascripttests/test262/test/language/expressions/super/call-spread-err-sngl-err-unresolvable.js
raw symbols SCIP| 1 | // This file was procedurally generated from the following sources: |
| 2 | // - src/spread/sngl-err-unresolvable.case |
| 3 | // - src/spread/error/super-call.template |
| 4 | /*--- |
| 5 | description: Spread operator applied to the only argument when reference is unresolvable (SuperCall) |
| 6 | esid: sec-super-keyword-runtime-semantics-evaluation |
| 7 | es6id: 12.3.5.1 |
| 8 | flags: [generated] |
| 9 | info: | |
| 10 | SuperCall : super Arguments |
| 11 | |
| 12 | 1. Let newTarget be GetNewTarget(). |
| 13 | 2. If newTarget is undefined, throw a ReferenceError exception. |
| 14 | 3. Let func be GetSuperConstructor(). |
| 15 | 4. ReturnIfAbrupt(func). |
| 16 | 5. Let argList be ArgumentListEvaluation of Arguments. |
| 17 | [...] |
| 18 | |
| 19 | 12.3.6.1 Runtime Semantics: ArgumentListEvaluation |
| 20 | |
| 21 | ArgumentList : ... AssignmentExpression |
| 22 | |
| 23 | 1. Let list be an empty List. |
| 24 | 2. Let spreadRef be the result of evaluating AssignmentExpression. |
| 25 | 3. Let spreadObj be GetValue(spreadRef). |
| 26 | 4. Let iterator be GetIterator(spreadObj). |
| 27 | 5. ReturnIfAbrupt(iterator). |
| 28 | |
| 29 | 6.2.3.1 GetValue (V) |
| 30 | |
| 31 | 1. ReturnIfAbrupt(V). |
| 32 | 2. If Type(V) is not Reference, return V. |
| 33 | 3. Let base be GetBase(V). |
| 34 | 4. If IsUnresolvableReference(V), throw a ReferenceError exception. |
| 35 | ---*/ |
| 36 | |
| 37 | class Test262ParentClass { |
| 38 | constructor() {} |
| 39 | } |
| 40 | |
| 41 | class Test262ChildClass extends Test262ParentClass { |
| 42 | constructor() { |
| 43 | super(...unresolvableReference); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | assert.throws(ReferenceError, function() { |
| 48 | new Test262ChildClass(); |
| 49 | }); |