call-spread-err-sngl-err-unresolvable.js (1422B)
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 flags: [generated] 8 info: | 9 SuperCall : super Arguments 10 11 1. Let newTarget be GetNewTarget(). 12 2. If newTarget is undefined, throw a ReferenceError exception. 13 3. Let func be GetSuperConstructor(). 14 4. ReturnIfAbrupt(func). 15 5. Let argList be ArgumentListEvaluation of Arguments. 16 [...] 17 18 12.3.6.1 Runtime Semantics: ArgumentListEvaluation 19 20 ArgumentList : ... AssignmentExpression 21 22 1. Let list be an empty List. 23 2. Let spreadRef be the result of evaluating AssignmentExpression. 24 3. Let spreadObj be GetValue(spreadRef). 25 4. Let iterator be GetIterator(spreadObj). 26 5. ReturnIfAbrupt(iterator). 27 28 6.2.3.1 GetValue (V) 29 30 1. ReturnIfAbrupt(V). 31 2. If Type(V) is not Reference, return V. 32 3. Let base be GetBase(V). 33 4. If IsUnresolvableReference(V), throw a ReferenceError exception. 34 ---*/ 35 36 class Test262ParentClass { 37 constructor() {} 38 } 39 40 class Test262ChildClass extends Test262ParentClass { 41 constructor() { 42 super(...unresolvableReference); 43 } 44 } 45 46 assert.throws(ReferenceError, function() { 47 new Test262ChildClass(); 48 }); 49 50 reportCompare(0, 0);