tor-browser

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

named-rest-params-trailing-comma-early-error.js (1238B)


      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-gen-named-func-expr.template
      5 /*---
      6 description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async generator named function expression)
      7 esid: sec-asyncgenerator-definitions-evaluation
      8 features: [async-iteration]
      9 flags: [generated]
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 info: |
     14    AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
     15        ( FormalParameters ) { AsyncGeneratorBody }
     16 
     17        [...]
     18        7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
     19           AsyncGeneratorBody, funcEnv, strict).
     20        [...]
     21 
     22 
     23    Trailing comma in the parameters list
     24 
     25    14.1 Function Definitions
     26 
     27    FormalParameters[Yield, Await] :
     28        [empty]
     29        FunctionRestParameter[?Yield, ?Await]
     30        FormalParameterList[?Yield, ?Await]
     31        FormalParameterList[?Yield, ?Await] ,
     32        FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
     33 ---*/
     34 $DONOTEVALUATE();
     35 
     36 
     37 0, async function* g(...a,) {
     38  
     39 };