tor-browser

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

ary-ptrn-rest-not-final-obj.js (1157B)


      1 // |reftest| error:SyntaxError
      2 // This file was procedurally generated from the following sources:
      3 // - src/dstr-binding/ary-ptrn-rest-not-final-obj.case
      4 // - src/dstr-binding/default/let-stmt.template
      5 /*---
      6 description: Rest element (object binding pattern) may not be followed by any element (`let` statement)
      7 esid: sec-let-and-const-declarations-runtime-semantics-evaluation
      8 features: [destructuring-binding]
      9 flags: [generated]
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 info: |
     14    LexicalBinding : BindingPattern Initializer
     15 
     16    1. Let rhs be the result of evaluating Initializer.
     17    2. Let value be GetValue(rhs).
     18    3. ReturnIfAbrupt(value).
     19    4. Let env be the running execution context's LexicalEnvironment.
     20    5. Return the result of performing BindingInitialization for BindingPattern
     21       using value and env as the arguments.
     22 
     23    13.3.3 Destructuring Binding Patterns
     24    ArrayBindingPattern[Yield] :
     25        [ Elisionopt BindingRestElement[?Yield]opt ]
     26        [ BindingElementList[?Yield] ]
     27        [ BindingElementList[?Yield] , Elisionopt BindingRestElement[?Yield]opt ]
     28 ---*/
     29 $DONOTEVALUATE();
     30 
     31 let [...{ x }, y] = [1, 2, 3];