archives

« Bugzilla Issues Index

#2522 — 13.6.3, 13.6.4 for statements: Add lookahead restriction for "let ["


13.6.3 The for Statement
13.6.4 The for-in and for-of Statements

Add a lookahead restriction to disallow "let [" similar to the restriction in '13.4 Expression Statement':
---
for (
[lookahead ∉ { let [ }] Expression[?Yield]opt ;
Expression[In, ?Yield]opt ;
Expression[In, ?Yield]opt
) Statement[?Yield, ?Return]

for (
[lookahead ∉ { let [ }] LeftHandSideExpression[?Yield]
in Expression[In, ?Yield]
) Statement[?Yield, ?Return]

for (
[lookahead ∉ { let [ }] LeftHandSideExpression[?Yield]
of AssignmentExpression[In, ?Yield]
) Statement[?Yield, ?Return]
---




*** This bug has been marked as a duplicate of bug 2525 ***