Chromium Code Reviews| Index: src/parsing/parser-base.h |
| diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
| index d736db53123e3d4ce96497925e008babe8810b6f..ce24ce48e7903ff3212c576dbe65b6d391b450ed 100644 |
| --- a/src/parsing/parser-base.h |
| +++ b/src/parsing/parser-base.h |
| @@ -1961,7 +1961,6 @@ ParserBase<Traits>::ParsePropertyDefinition( |
| if (!in_class && !is_generator) { |
| DCHECK(!IsStaticMethod(method_kind)); |
| - |
| if (peek() == Token::COLON) { |
| // PropertyDefinition |
| // PropertyName ':' AssignmentExpression |
| @@ -1994,6 +1993,16 @@ ParserBase<Traits>::ParsePropertyDefinition( |
| scanner()->FindSymbol(classifier->duplicate_finder(), 1) != 0) { |
| classifier->RecordDuplicateFormalParameterError(scanner()->location()); |
| } |
| + |
| + if (this->IsEvalOrArguments(*name)) { |
| + classifier->RecordStrictModeFormalParameterError( |
|
adamk
2016/08/17 19:32:51
Can you explain why this is needed? In particular,
lpy
2016/08/19 17:00:40
My mistakes. My understanding is when we enter Pro
|
| + scanner()->location(), MessageTemplate::kStrictEvalArguments); |
| + if (is_strict(language_mode())) { |
| + classifier->RecordBindingPatternError( |
| + scanner()->location(), MessageTemplate::kStrictEvalArguments); |
| + } |
| + } |
| + |
| if (name_token == Token::LET) { |
| classifier->RecordLetPatternError( |
| scanner()->location(), MessageTemplate::kLetInLexicalBinding); |