Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1068)

Unified Diff: src/parser.cc

Issue 1327483002: Stage sloppy let (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: another test Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | test/test262-es6/test262-es6.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 319d468e4d61db43f529e8424139842d7bede8ba..8dafdc9cc8cb26ca5d18aa3d8fd01455ad6d454d 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -3594,7 +3594,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);
« no previous file with comments | « src/flag-definitions.h ('k') | test/test262-es6/test262-es6.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698