tor-browser

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

privatename-not-valid-earlyerr-script-3.js (725B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2017 Valerie Young. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 /*---
      5 esid: sec-scripts-static-semantics-early-errors
      6 description: Early error when referencing privatename that has not been declared in class.
      7 info: |
      8  Static Semantics: Early Errors
      9    ScriptBody : StatementList
     10 
     11    It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List as an argument is false unless the source code is eval code that is being processed by a direct eval.
     12 
     13 features: [class, class-fields-private, class-fields-public]
     14 negative:
     15  phase: parse
     16  type: SyntaxError
     17 ---*/
     18 
     19 $DONOTEVALUATE();
     20 
     21 class C {
     22  y = this.#x;
     23 }