tor-browser

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

dflt-params-rest.js (2111B)


      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-gen-meth.template
      5 /*---
      6 description: RestParameter does not support an initializer (class expression async generator method)
      7 esid: sec-class-definitions-runtime-semantics-evaluation
      8 features: [default-parameters, async-iteration]
      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           i. Let status be the result of performing
     27              PropertyDefinitionEvaluation for m with arguments proto and
     28              false.
     29        [...]
     30 
     31    Runtime Semantics: PropertyDefinitionEvaluation
     32 
     33    AsyncGeneratorMethod :
     34        async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
     35            { AsyncGeneratorBody }
     36 
     37    1. Let propKey be the result of evaluating PropertyName.
     38    2. ReturnIfAbrupt(propKey).
     39    3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
     40       Otherwise let strict be false.
     41    4. Let scope be the running execution context's LexicalEnvironment.
     42    5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
     43       AsyncGeneratorBody, scope, strict).
     44    [...]
     45 
     46 
     47    14.1 Function Definitions
     48 
     49    Syntax
     50 
     51    FunctionRestParameter[Yield] :
     52 
     53      BindingRestElement[?Yield]
     54 
     55    13.3.3 Destructuring Binding Patterns
     56 
     57    Syntax
     58 
     59    BindingRestElement[Yield] :
     60 
     61      ...BindingIdentifier[?Yield]
     62      ...BindingPattern[?Yield]
     63 
     64 ---*/
     65 $DONOTEVALUATE();
     66 
     67 0, class {
     68  async *method(...x = []) {
     69    
     70  }
     71 };