Debian Codegraph @

js/src/tests/test262/language/expressions/optional-chaining/call-expression-super-no-base.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright 2019 Google, Inc. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 esid: prod-OptionalExpression
6 description: >
7 should not suppress error if super called on class with no base
8 info: |
9 Left-Hand-Side Expressions
10 OptionalExpression:
11 SuperCall OptionalChain
12 features: [optional-chaining]
13 negative:
14 phase: parse
15 type: SyntaxError
16 ---*/
17
18 $DONOTEVALUATE();
19
20 class C {
21 constructor () {
22 super()?.a;
23 }
24 }