Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index 3916c946ac9d9aa1474685855817fb6258557838..9d73486ed35b094f9ec85ace8c59e4f765890825 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -1946,10 +1946,16 @@ ParserBase<Traits>::ParsePropertyDefinition( |
classifier->RecordLetPatternError( |
scanner()->location(), MessageTemplate::kLetInLexicalBinding); |
} |
- if (is_await && is_async_function()) { |
- classifier->RecordPatternError( |
- Scanner::Location(next_beg_pos, next_end_pos), |
- MessageTemplate::kAwaitBindingIdentifier); |
+ if (is_await) { |
+ if (is_async_function()) { |
+ classifier->RecordPatternError( |
+ Scanner::Location(next_beg_pos, next_end_pos), |
+ MessageTemplate::kAwaitBindingIdentifier); |
+ } else { |
+ classifier->RecordAsyncArrowFormalParametersError( |
+ Scanner::Location(next_beg_pos, next_end_pos), |
+ MessageTemplate::kAwaitBindingIdentifier); |
+ } |
} |
ExpressionT lhs = this->ExpressionFromIdentifier( |
*name, next_beg_pos, next_end_pos, scope_, factory()); |