aboutsummaryrefslogtreecommitdiffstats
path: root/src/spread/error/super-call.template
blob: 6b64eb6b3c10d32830eee10f73bb28cad4368511 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// 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-err-
name: SuperCall
esid: sec-super-keyword-runtime-semantics-evaluation
es6id: 12.3.5.1
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.
    [...]
---*/

class Test262ParentClass {
  constructor(/*{ params }*/) {}
}

class Test262ChildClass extends Test262ParentClass {
  constructor() {
    super(/*{ args }*/);
  }
}

assert.throws(/*{ error }*/, function() {
  new Test262ChildClass();
});