summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-get-set.js
blob: 482b6920dd8a386476cf277589da34bc6ef5cb1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-get-set.case
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
/*---
description: It's valid if a class contains a private getter and a private setter with the same name (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
info: |
    Static Semantics: Early Errors

    ClassBody : ClassElementList
        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.

---*/


class C {
  get #m() {}
  set #m(_) {}
}

reportCompare(0, 0);