blob: 7212910f71c4b92e677f625e2d53857f66e5d1e4 [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-
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);