head-lhs-let.js (693B)
1 // |reftest| error:SyntaxError 2 // Copyright (C) 2016 the V8 project authors. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 /*--- 5 esid: sec-for-in-and-for-of-statements 6 es6id: 13.7.5 7 description: > 8 The `let` token is disallowed when not followed by a `[` token 9 info: | 10 Syntax 11 12 IterationStatement[Yield, Return]: 13 14 for ( [lookahead ≠ let]LeftHandSideExpression[?Yield] of 15 AssignmentExpression[+In, ?Yield] ) Statement[?Yield, ?Return] 16 17 for ( ForDeclaration[?Yield] of AssignmentExpression[+In, ?Yield] ) 18 Statement[?Yield, ?Return] 19 negative: 20 phase: parse 21 type: SyntaxError 22 ---*/ 23 24 $DONOTEVALUATE(); 25 26 for ( let of [] ) ;