tor-browser

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

async-meth-dflt-params-rest.js (903B)


      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-meth.template
      5 /*---
      6 description: RestParameter does not support an initializer (async method)
      7 esid: sec-async-function-definitions
      8 features: [default-parameters, async-iteration]
      9 flags: [generated]
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 info: |
     14    14.6 Async Function Definitions
     15 
     16    AsyncMethod :
     17     async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
     18 
     19 
     20    14.1 Function Definitions
     21 
     22    Syntax
     23 
     24    FunctionRestParameter[Yield] :
     25 
     26      BindingRestElement[?Yield]
     27 
     28    13.3.3 Destructuring Binding Patterns
     29 
     30    Syntax
     31 
     32    BindingRestElement[Yield] :
     33 
     34      ...BindingIdentifier[?Yield]
     35      ...BindingPattern[?Yield]
     36 
     37 ---*/
     38 $DONOTEVALUATE();
     39 
     40 
     41 ({
     42  async *method(...x = []) {
     43    
     44  }
     45 });