tor-browser

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

array-rest-init.js (820B)


      1 // |reftest| error:SyntaxError
      2 // This file was procedurally generated from the following sources:
      3 // - src/dstr-assignment/array-rest-init.case
      4 // - src/dstr-assignment/syntax/assignment-expr.template
      5 /*---
      6 description: The AssignmentRestElement does not support an initializer. (AssignmentExpression)
      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 $DONOTEVALUATE();
     23 var x;
     24 
     25 0, [...x = 1] = [];