tor-browser

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

private-arrow-fnc-init-err-contains-arguments.js (1102B)


      1 // |reftest| error:SyntaxError
      2 // This file was procedurally generated from the following sources:
      3 // - src/class-elements/init-err-contains-arguments.case
      4 // - src/class-elements/initializer-error/cls-expr-fields-private-arrow-fnc.template
      5 /*---
      6 description: Syntax error if `arguments` 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 ContainsArguments of Initializer is true.
     20 
     21    Static Semantics: ContainsArguments
     22      IdentifierReference : Identifier
     23 
     24      1. If the StringValue of Identifier is "arguments", return true.
     25      ...
     26      For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
     27 
     28 ---*/
     29 
     30 
     31 $DONOTEVALUATE();
     32 
     33 var C = class {
     34  #x = () => arguments;
     35 }