Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/super/call-spread-err-mult-err-expr-throws.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/spread/mult-err-expr-throws.case
3 // - src/spread/error/super-call.template
4 /*---
5 description: Spread operator following other arguments when evaluation throws (SuperCall)
6 esid: sec-super-keyword-runtime-semantics-evaluation
7 es6id: 12.3.5.1
8 features: [generators]
9 flags: [generated]
10 info: |
11 SuperCall : super Arguments
12
13 1. Let newTarget be GetNewTarget().
14 2. If newTarget is undefined, throw a ReferenceError exception.
15 3. Let func be GetSuperConstructor().
16 4. ReturnIfAbrupt(func).
17 5. Let argList be ArgumentListEvaluation of Arguments.
18 [...]
19
20 12.3.6.1 Runtime Semantics: ArgumentListEvaluation
21
22 ArgumentList : ArgumentList , ... AssignmentExpression
23
24 1. Let precedingArgs be the result of evaluating ArgumentList.
25 2. Let spreadRef be the result of evaluating AssignmentExpression.
26 3. Let iterator be GetIterator(GetValue(spreadRef) ).
27 4. ReturnIfAbrupt(iterator).
28
29 ---*/
30
31 class Test262ParentClass {
32 constructor() {}
33 }
34
35 class Test262ChildClass extends Test262ParentClass {
36 constructor() {
37 super(0, ...function*() { throw new Test262Error(); }());
38 }
39 }
40
41 assert.throws(Test262Error, function() {
42 new Test262ChildClass();
43 });