tor-browser

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

meth-dflt-params-rest.js (1763B)


      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/meth.template
      5 /*---
      6 description: RestParameter does not support an initializer (method)
      7 esid: sec-runtime-semantics-definemethod
      8 features: [default-parameters]
      9 flags: [generated]
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 info: |
     14    MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
     15 
     16    [...]
     17    6. Let closure be FunctionCreate(kind, StrictFormalParameters,
     18       FunctionBody, scope, strict). If functionPrototype was passed as a
     19       parameter then pass its value as the functionPrototype optional argument
     20       of FunctionCreate.
     21    [...]
     22 
     23    9.2.1 [[Call]] ( thisArgument, argumentsList)
     24 
     25    [...]
     26    7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
     27    [...]
     28 
     29    9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
     30 
     31    1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
     32    [...]
     33 
     34    9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
     35 
     36    [...]
     37    23. Let iteratorRecord be Record {[[iterator]]:
     38        CreateListIterator(argumentsList), [[done]]: false}.
     39    24. If hasDuplicates is true, then
     40        [...]
     41    25. Else,
     42        b. Let formalStatus be IteratorBindingInitialization for formals with
     43           iteratorRecord and env as arguments.
     44    [...]
     45 
     46    14.1 Function Definitions
     47 
     48    Syntax
     49 
     50    FunctionRestParameter[Yield] :
     51 
     52      BindingRestElement[?Yield]
     53 
     54    13.3.3 Destructuring Binding Patterns
     55 
     56    Syntax
     57 
     58    BindingRestElement[Yield] :
     59 
     60      ...BindingIdentifier[?Yield]
     61      ...BindingPattern[?Yield]
     62 
     63 ---*/
     64 $DONOTEVALUATE();
     65 
     66 0, {
     67  method(...x = []) {
     68    
     69  }
     70 };