Debian Codegraph @

js/src/tests/test262/language/statements/class/super/in-constructor-superproperty-evaluation.js

raw
1 // Copyright (C) 2018 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-makesuperpropertyreference
5 description: >
6 SuperProperty evaluation order: super() thisBinding initialization must occur first.
7 ---*/
8 class Derived extends Object {
9 constructor() {
10 super[super()];
11 throw new Test262Error();
12 }
13 }
14
15 assert.throws(ReferenceError, function() {
16 new Derived();
17 }, '`super[super()]` via `new Derived()` throws a ReferenceError');
18
19 reportCompare(0, 0);