tor-browser

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

obj-rest-not-last-element-invalid.js (888B)


      1 // |reftest| error:SyntaxError
      2 // This file was procedurally generated from the following sources:
      3 // - src/dstr-assignment/obj-rest-not-last-element-invalid.case
      4 // - src/dstr-assignment/syntax/assignment-expr.template
      5 /*---
      6 description: Object rest element needs to be the last AssignmenProperty in ObjectAssignmentPattern. (AssignmentExpression)
      7 esid: sec-variable-statement-runtime-semantics-evaluation
      8 features: [object-rest, 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 $DONOTEVALUATE();
     23 var rest, b;
     24 
     25 0, {...rest, b} = {}
     26 ;