tor-browser

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

private-method-static.js (457B)


      1 class B {
      2    static #smethod() {
      3        return 14;
      4    }
      5 
      6    static f() {
      7        return this.#smethod();
      8    }
      9 }
     10 assertEq(B.f(), 14);
     11 
     12 
     13 
     14 class OuterStatic {
     15    static #outerMethod() { return "ok"; }
     16 
     17    static test() {
     18        class Inner {
     19            #innerMethod() { }
     20            static test(outer) {
     21                return outer.#outerMethod();
     22            }
     23        }
     24        return Inner.test(this);
     25    }
     26 }
     27 assertEq(OuterStatic.test(), "ok");