Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index 760035dc7e6b7851de2264803910e703b8b7725f..679c2761a33c58fa491fb3d76bd8cff3b745874a 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -2112,6 +2112,12 @@ ParserBase<Traits>::ParseAssignmentExpression(bool accept_IN, int flags, |
function_state_->AddProperty(); |
} |
+ if (op != Token::ASSIGN && is_pattern_element) { |
+ classifier->RecordAssignmentPatternError( |
+ Scanner::Location(lhs_beg_pos, scanner()->location().end_pos), |
+ MessageTemplate::kInvalidDestructuringTarget); |
+ } |
+ |
this->CheckAssigningFunctionLiteralToProperty(expression, right); |
if (fni_ != NULL) { |