blob: af5bbfb40bac2b8442898d10fa72be57aefd7d33 [file] [log] [blame] [edit]
// 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
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();
});