Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index 42db4816de3ed060e3ec4dacfe07a8053dfd6fa6..70f9d708fc4bec163ae7f248baea8a34bcd48885 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -2573,6 +2573,7 @@ ParserBase<Impl>::ParseTailCallExpression(ExpressionClassifier* classifier, |
CheckNoTailCallExpressions(classifier, CHECK_OK); |
Scanner::Location loc(pos, scanner()->location().end_pos); |
+ |
if (!expression->IsCall()) { |
Scanner::Location sub_loc(sub_expression_pos, loc.end_pos); |
impl()->ReportMessageAt(sub_loc, |
@@ -2592,6 +2593,12 @@ ParserBase<Impl>::ParseTailCallExpression(ExpressionClassifier* classifier, |
*ok = false; |
return impl()->EmptyExpression(); |
} |
+ if (is_resumable()) { |
+ Scanner::Location sub_loc(sub_expression_pos, loc.end_pos); |
+ impl()->ReportMessageAt(sub_loc, MessageTemplate::kUnexpectedTailCall); |
+ *ok = false; |
+ return impl()->EmptyExpression(); |
+ } |
ReturnExprContext return_expr_context = |
function_state_->return_expr_context(); |
if (return_expr_context != ReturnExprContext::kInsideValidReturnStatement) { |