tor-browser

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

dflt-params-rest.js (2013B)


      1 // |reftest| error:SyntaxError
      2 // This file was procedurally generated from the following sources:
      3 // - src/function-forms/dflt-params-rest.case
      4 // - src/function-forms/syntax/cls-expr-async-meth-static.template
      5 /*---
      6 description: RestParameter does not support an initializer (static class expression async method)
      7 esid: sec-class-definitions-runtime-semantics-evaluation
      8 features: [default-parameters]
      9 flags: [generated]
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 info: |
     14    ClassExpression : class BindingIdentifieropt ClassTail
     15 
     16    1. If BindingIdentifieropt is not present, let className be undefined.
     17    2. Else, let className be StringValue of BindingIdentifier.
     18    3. Let value be the result of ClassDefinitionEvaluation of ClassTail
     19       with argument className.
     20    [...]
     21 
     22    14.5.14 Runtime Semantics: ClassDefinitionEvaluation
     23 
     24    21. For each ClassElement m in order from methods
     25      a. If IsStatic of m is false, then
     26      b. Else,
     27        Let status be the result of performing PropertyDefinitionEvaluation
     28        for m with arguments F and false.
     29    [...]
     30 
     31    Runtime Semantics: PropertyDefinitionEvaluation
     32 
     33    AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
     34 
     35    1. Let propKey be the result of evaluating PropertyName.
     36    2. ReturnIfAbrupt(propKey).
     37    3. If the function code for this AsyncMethod is strict mode code, let strict be true. Otherwise
     38       let strict be false.
     39    4. Let scope be the LexicalEnvironment of the running execution context.
     40    5. Let closure be ! AsyncFunctionCreate(Method, UniqueFormalParameters, AsyncFunctionBody,
     41       scope, strict).
     42    [...]
     43 
     44 
     45    14.1 Function Definitions
     46 
     47    Syntax
     48 
     49    FunctionRestParameter[Yield] :
     50 
     51      BindingRestElement[?Yield]
     52 
     53    13.3.3 Destructuring Binding Patterns
     54 
     55    Syntax
     56 
     57    BindingRestElement[Yield] :
     58 
     59      ...BindingIdentifier[?Yield]
     60      ...BindingPattern[?Yield]
     61 
     62 ---*/
     63 $DONOTEVALUATE();
     64 
     65 var C = class {
     66  static async method(...x = []) {
     67    
     68  }
     69 };