| Index: src/parsing/parser-base.h
|
| diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
|
| index a5e757782b064ccae49e4c49f20cc47e70abdd8b..faea8b581b4703f01ff7624d73ae977c56ba6e95 100644
|
| --- a/src/parsing/parser-base.h
|
| +++ b/src/parsing/parser-base.h
|
| @@ -3277,8 +3277,13 @@ void ParserBase<Traits>::CheckDestructuringElement(
|
| MessageTemplate::kInvalidDestructuringTarget;
|
| const Scanner::Location location(begin, end);
|
| if (expression->IsArrayLiteral() || expression->IsObjectLiteral() ||
|
| - expression->IsAssignment())
|
| + expression->IsAssignment()) {
|
| + if (expression->is_parenthesized()) {
|
| + classifier->RecordPatternError(location, message);
|
| + }
|
| return;
|
| + }
|
| +
|
| if (expression->IsProperty()) {
|
| classifier->RecordBindingPatternError(location, message);
|
| } else if (!this->IsAssignableIdentifier(expression)) {
|
|
|