tor-browser

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

async-gen-meth-dflt-params-rest.js (1402B)


      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/async-gen-meth.template
      5 /*---
      6 description: RestParameter does not support an initializer (async generator method)
      7 esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
      8 features: [default-parameters, async-iteration]
      9 flags: [generated]
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 info: |
     14    AsyncGeneratorMethod :
     15        async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
     16            { AsyncGeneratorBody }
     17 
     18    1. Let propKey be the result of evaluating PropertyName.
     19    2. ReturnIfAbrupt(propKey).
     20    3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
     21       Otherwise let strict be false.
     22    4. Let scope be the running execution context's LexicalEnvironment.
     23    5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
     24       AsyncGeneratorBody, scope, strict).
     25    [...]
     26 
     27 
     28    14.1 Function Definitions
     29 
     30    Syntax
     31 
     32    FunctionRestParameter[Yield] :
     33 
     34      BindingRestElement[?Yield]
     35 
     36    13.3.3 Destructuring Binding Patterns
     37 
     38    Syntax
     39 
     40    BindingRestElement[Yield] :
     41 
     42      ...BindingIdentifier[?Yield]
     43      ...BindingPattern[?Yield]
     44 
     45 ---*/
     46 $DONOTEVALUATE();
     47 
     48 0, {
     49  async *method(...x = []) {
     50    
     51  }
     52 };