| // Copyright (C) 2016 the V8 project authors. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| /*--- |
| path: language/expressions/super/call-spread- |
| name: SuperCall |
| esid: sec-super-keyword-runtime-semantics-evaluation |
| info: | |
| SuperCall : super Arguments |
| |
| 1. Let newTarget be GetNewTarget(). |
| 2. If newTarget is undefined, throw a ReferenceError exception. |
| 3. Let func be GetSuperConstructor(). |
| 4. ReturnIfAbrupt(func). |
| 5. Let argList be ArgumentListEvaluation of Arguments. |
| [...] |
| ---*/ |
| |
| var callCount = 0; |
| |
| class Test262ParentClass { |
| constructor(/*{ params }*/) { |
| /*{ body }*/ |
| callCount += 1; |
| } |
| } |
| |
| class Test262ChildClass extends Test262ParentClass { |
| constructor() { |
| super(/*{ args }*/); |
| } |
| } |
| |
| new Test262ChildClass(); |
| assert.sameValue(callCount, 1); |