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

Unified Diff: src/preparser.h

Issue 1401253003: Check for let in lexically bound names for short object literals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | test/message/let-lexical-name-in-object-prohibited.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index d890ae5c216d7b497d0f3801288bd2fe7c4123fb..433a94893720e78d71f946abbd9ffbfbd8b553dc 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -2648,6 +2648,10 @@ ParserBase<Traits>::ParsePropertyDefinition(
scanner()->FindSymbol(classifier->duplicate_finder(), 1) != 0) {
classifier->RecordDuplicateFormalParameterError(scanner()->location());
}
+ if (name_token == Token::LET) {
+ classifier->RecordLetPatternError(
+ scanner()->location(), MessageTemplate::kLetInLexicalBinding);
+ }
ExpressionT lhs = this->ExpressionFromIdentifier(
name, next_beg_pos, next_end_pos, scope_, factory());
« no previous file with comments | « no previous file | test/message/let-lexical-name-in-object-prohibited.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698