Debian Codegraph @

js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-private-gen-meth-super.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/class-elements/grammar-static-private-gen-meth-super.case
4 // - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
5 /*---
6 description: Static Generator Private Methods cannot contain direct super (class declaration)
7 esid: prod-ClassElement
8 features: [generators, class-static-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 : static MethodDefinition
17 It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
18
19 ---*/
20
21
22 $DONOTEVALUATE();
23
24 class C extends Function{
25 static * #method() {
26 super();
27 }
28 }