tor-browser

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

nested-private-arrow-fnc-init-err-contains-super.js (849B)


      1 // |reftest| error:SyntaxError
      2 // This file was procedurally generated from the following sources:
      3 // - src/class-elements/init-err-contains-super.case
      4 // - src/class-elements/initializer-error/cls-decl-fields-private-arrow-fnc-nested.template
      5 /*---
      6 description: Syntax error if `super()` used in class field (private field, arrow function expression)
      7 esid: sec-class-definitions-static-semantics-early-errors
      8 features: [class, class-fields-public, arrow-function, class-fields-private]
      9 flags: [generated]
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 info: |
     14    Static Semantics: Early Errors
     15 
     16      FieldDefinition:
     17        PropertyNameInitializeropt
     18 
     19      - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
     20 
     21 ---*/
     22 
     23 
     24 $DONOTEVALUATE();
     25 
     26 class C {
     27  #x = () => {
     28    var t = () => super();
     29    t();
     30  }
     31 }