| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index f122d9aa5e4b57ff1459cfa48e060c666bd407ff..8a6f2ebd9c6e445070e0cde3c4abaa567e7d64e9 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -2553,7 +2553,9 @@ void Parser::ParseVariableDeclarations(VariableDeclarationContext var_context,
|
| is_for_iteration_variable =
|
| var_context == kForStatement &&
|
| (peek() == Token::IN || PeekContextualKeyword(CStrVector("of")));
|
| - if (is_for_iteration_variable && parsing_result->descriptor.mode == CONST) {
|
| + if (is_for_iteration_variable &&
|
| + (parsing_result->descriptor.mode == CONST ||
|
| + parsing_result->descriptor.mode == CONST_LEGACY)) {
|
| parsing_result->descriptor.needs_init = false;
|
| }
|
|
|
|
|