Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index d03815c44d99e14f4b0e70ac171ec0663f11bfd8..bd9ef707b6c694b15c6561dcb63b91554e7822e7 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -2108,7 +2108,8 @@ ParserBase<Traits>::ParseYieldExpression(ExpressionClassifier* classifier, |
// YieldExpression :: |
// 'yield' ([no line terminator] '*'? AssignmentExpression)? |
int pos = peek_position(); |
- BindingPatternUnexpectedToken(classifier); |
+ classifier->RecordPatternError(scanner()->peek_location(), |
+ MessageTemplate::kInvalidDestructuringTarget); |
FormalParameterInitializerUnexpectedToken(classifier); |
Expect(Token::YIELD, CHECK_OK); |
ExpressionT generator_object = |