tor-browser

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

array-rest-before-element.js (1232B)


      1 // |reftest| error:SyntaxError
      2 // This file was procedurally generated from the following sources:
      3 // - src/dstr-assignment/array-rest-before-element.case
      4 // - src/dstr-assignment/syntax/for-of.template
      5 /*---
      6 description: An AssignmentElement may not follow an AssignmentRestElement in an AssignmentElementList. (For..of statement)
      7 esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
      8 features: [destructuring-binding]
      9 flags: [generated]
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 info: |
     14    IterationStatement :
     15      for ( LeftHandSideExpression of AssignmentExpression ) Statement
     16 
     17    1. Let keyResult be the result of performing ? ForIn/OfHeadEvaluation(« »,
     18       AssignmentExpression, iterate).
     19    2. Return ? ForIn/OfBodyEvaluation(LeftHandSideExpression, Statement,
     20       keyResult, assignment, labelSet).
     21 
     22    13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation
     23 
     24    [...]
     25    4. If destructuring is true and if lhsKind is assignment, then
     26       a. Assert: lhs is a LeftHandSideExpression.
     27       b. Let assignmentPattern be the parse of the source text corresponding to
     28          lhs using AssignmentPattern as the goal symbol.
     29    [...]
     30 ---*/
     31 $DONOTEVALUATE();
     32 
     33 for ([...x, y] of [[]]) ;