tor-browser

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

nameless-rest-params-trailing-comma-early-error.js (1042B)


      1 // |reftest| error:SyntaxError
      2 // This file was procedurally generated from the following sources:
      3 // - src/function-forms/rest-params-trailing-comma-early-error.case
      4 // - src/function-forms/syntax/async-func-expr-nameless.template
      5 /*---
      6 description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async function nameless expression)
      7 esid: sec-async-function-definitions
      8 features: [async-functions]
      9 flags: [generated]
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 info: |
     14    14.6 Async Function Definitions
     15 
     16    AsyncFunctionExpression :
     17      async function ( FormalParameters ) { AsyncFunctionBody }
     18 
     19 
     20    Trailing comma in the parameters list
     21 
     22    14.1 Function Definitions
     23 
     24    FormalParameters[Yield, Await] :
     25        [empty]
     26        FunctionRestParameter[?Yield, ?Await]
     27        FormalParameterList[?Yield, ?Await]
     28        FormalParameterList[?Yield, ?Await] ,
     29        FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
     30 ---*/
     31 $DONOTEVALUATE();
     32 
     33 
     34 (async function(...a,) {
     35  
     36 });