Debian Codegraph @

js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-special-meth-contains-super-private-async.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/class-elements/grammar-special-meth-contains-super-private-async.case
4 // - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
5 /*---
6 description: Private Async Methods cannot contain direct super (class declaration)
7 esid: prod-ClassElement
8 features: [async-functions, class-methods-private, class]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 Class Definitions / Static Semantics: Early Errors
15
16 ClassElement : MethodDefinition
17 It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
18
19 ---*/
20
21
22 $DONOTEVALUATE();
23
24 class C extends Function{
25 async #method() {
26 super();
27 }
28 }