array-elem-target-simple-strict-strict.js (1339B)
1 // |reftest| error:SyntaxError 2 'use strict'; 3 // This file was procedurally generated from the following sources: 4 // - src/dstr-assignment/array-elem-target-simple-strict.case 5 // - src/dstr-assignment/syntax/for-of.template 6 /*--- 7 description: It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget(LeftHandSideExpression) is false. (For..of statement) 8 esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation 9 features: [destructuring-binding] 10 flags: [generated, onlyStrict] 11 negative: 12 phase: parse 13 type: SyntaxError 14 info: | 15 IterationStatement : 16 for ( LeftHandSideExpression of AssignmentExpression ) Statement 17 18 1. Let keyResult be the result of performing ? ForIn/OfHeadEvaluation(« », 19 AssignmentExpression, iterate). 20 2. Return ? ForIn/OfBodyEvaluation(LeftHandSideExpression, Statement, 21 keyResult, assignment, labelSet). 22 23 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation 24 25 [...] 26 4. If destructuring is true and if lhsKind is assignment, then 27 a. Assert: lhs is a LeftHandSideExpression. 28 b. Let assignmentPattern be the parse of the source text corresponding to 29 lhs using AssignmentPattern as the goal symbol. 30 [...] 31 ---*/ 32 $DONOTEVALUATE(); 33 34 for ([arguments] of [[]]) ;