tor-browser

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

nested-static-comp-name-init-err-contains-arguments.js (1140B)


      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-static-comp-name-nested.template
      5 /*---
      6 description: Syntax error if `arguments` used in class field (static computed ClassElementName)
      7 esid: sec-class-definitions-static-semantics-early-errors
      8 features: [class, class-fields-public, class-static-fields-public, computed-property-names]
      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 $DONOTEVALUATE();
     31 
     32 var x = "string";
     33 var C = class {
     34  static [x] = () => arguments;
     35 }