Index: src/parser.cc |
diff --git a/src/parser.cc b/src/parser.cc |
index e6ef2e8ef3096f80195170585656a90630096adb..d993d20595de80567f267e8410dfe77edcbe450c 100644 |
--- a/src/parser.cc |
+++ b/src/parser.cc |
@@ -3601,7 +3601,8 @@ Statement* Parser::ParseForStatement(ZoneList<const AstRawString*>* labels, |
return nullptr; |
} |
if (parsing_result.first_initializer_loc.IsValid() && |
- (is_strict(language_mode()) || mode == ForEachStatement::ITERATE)) { |
+ (is_strict(language_mode()) || mode == ForEachStatement::ITERATE || |
+ IsLexicalVariableMode(parsing_result.descriptor.mode))) { |
if (mode == ForEachStatement::ITERATE) { |
ReportMessageAt(parsing_result.first_initializer_loc, |
MessageTemplate::kForOfLoopInitializer); |