diff --git a/src/parsing/expression-scope.h b/src/parsing/expression-scope.h index dc1c86dd36..8d4d1c93ac 100644 --- a/src/parsing/expression-scope.h +++ b/src/parsing/expression-scope.h @@ -163,11 +163,6 @@ class ExpressionScope { AsExpressionParsingScope()->RecordExpressionError(loc, message); } - void RecordLexicalDeclarationError(const Scanner::Location& loc, - MessageTemplate message) { - if (IsLexicalDeclaration()) Report(loc, message); - } - void RecordNonSimpleParameter() { if (!IsArrowHeadParsingScope()) return; AsArrowHeadParsingScope()->RecordNonSimpleParameter(); diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h index 5d32271db2..3228b32a45 100644 --- a/src/parsing/parser-base.h +++ b/src/parsing/parser-base.h @@ -2333,10 +2333,6 @@ ParserBase::ParseObjectPropertyDefinition(ParsePropertyInfo* prop_info, DCHECK(!prop_info->is_computed_name); - if (name_token == Token::LET) { - expression_scope()->RecordLexicalDeclarationError( - scanner()->location(), MessageTemplate::kLetInLexicalBinding); - } if (name_token == Token::AWAIT) { DCHECK(!is_async_function()); expression_scope()->RecordAsyncArrowParametersError(