tor-browser

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

ary-ptrn-rest-init-id.js (1052B)


      1 // |reftest| error:SyntaxError
      2 // This file was procedurally generated from the following sources:
      3 // - src/dstr-binding/ary-ptrn-rest-init-id.case
      4 // - src/dstr-binding/default/var-stmt.template
      5 /*---
      6 description: Rest element (identifier) does not support initializer (`var` statement)
      7 esid: sec-variable-statement-runtime-semantics-evaluation
      8 features: [destructuring-binding]
      9 flags: [generated]
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 info: |
     14    VariableDeclaration : BindingPattern Initializer
     15 
     16    1. Let rhs be the result of evaluating Initializer.
     17    2. Let rval be GetValue(rhs).
     18    3. ReturnIfAbrupt(rval).
     19    4. Return the result of performing BindingInitialization for
     20       BindingPattern passing rval and undefined as arguments.
     21 
     22    13.3.3 Destructuring Binding Patterns
     23    ArrayBindingPattern[Yield] :
     24        [ Elisionopt BindingRestElement[?Yield]opt ]
     25        [ BindingElementList[?Yield] ]
     26        [ BindingElementList[?Yield] , Elisionopt BindingRestElement[?Yield]opt ]
     27 ---*/
     28 $DONOTEVALUATE();
     29 
     30 var [...x = []] = [];