Debian Codegraph @

js/src/tests/test262/language/expressions/class/elements/syntax/valid/grammar-privatemeth-duplicate-meth-nestedclassmeth.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/class-elements/grammar-privatemeth-duplicate-meth-nestedclassmeth.case
3 // - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
4 /*---
5 description: It's valid if a nested class shadows a private method (class expression)
6 esid: prod-ClassElement
7 features: [class-methods-private, class]
8 flags: [generated]
9 info: |
10 Static Semantics: Early Errors
11
12 ClassBody : ClassElementList
13 It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
14
15 ---*/
16
17
18 var C = class {
19 constructor() {
20 class B {
21 #m() {}
22 }
23 }
24
25 #m() {}
26 };
27
28 reportCompare(0, 0);