tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

grammar-privatemeth-duplicate-get-set.js (762B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/class-elements/grammar-privatemeth-duplicate-get-set.case
      3 // - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
      4 /*---
      5 description: It's valid if a class contains a private getter and a private setter with the same name (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  get #m() {}
     20  set #m(_) {}
     21 };
     22 
     23 reportCompare(0, 0);