Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index b3b516ead13d8256bdcfc39806911e9480cb9908..aa6a9859d5a24ce9e1a48a82c80e98af005fd8ec 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -1955,7 +1955,6 @@ ParserBase<Traits>::ParsePropertyDefinition( |
if (!in_class && !is_generator) { |
DCHECK(!IsStaticMethod(method_kind)); |
- |
if (peek() == Token::COLON) { |
// PropertyDefinition |
// PropertyName ':' AssignmentExpression |
@@ -1988,6 +1987,12 @@ ParserBase<Traits>::ParsePropertyDefinition( |
scanner()->FindSymbol(classifier->duplicate_finder(), 1) != 0) { |
classifier->RecordDuplicateFormalParameterError(scanner()->location()); |
} |
+ |
+ if (this->IsEvalOrArguments(*name) && is_strict(language_mode())) { |
+ classifier->RecordBindingPatternError( |
+ scanner()->location(), MessageTemplate::kStrictEvalArguments); |
+ } |
+ |
if (name_token == Token::LET) { |
classifier->RecordLetPatternError( |
scanner()->location(), MessageTemplate::kLetInLexicalBinding); |