diff --git a/crates/oxc_parser/src/js/declaration.rs b/crates/oxc_parser/src/js/declaration.rs index 4207ff5263dda..e4bdfc5468a8b 100644 --- a/crates/oxc_parser/src/js/declaration.rs +++ b/crates/oxc_parser/src/js/declaration.rs @@ -27,7 +27,7 @@ impl<'a> ParserImpl<'a> { // let.a = 1, let?.a = 1, let()[a] = 1 } else if matches!(peeked, Kind::Dot | Kind::QuestionDot | Kind::LParen) { let expr = self.parse_expr(); - self.ast.statement_expression(self.end_span(span), expr) + self.parse_expression_statement(span, expr) // single statement let declaration: while (0) let } else if (stmt_ctx.is_single_statement() && peeked != Kind::LBrack) || peeked == Kind::Semicolon diff --git a/tasks/coverage/snapshots/codegen_misc.snap b/tasks/coverage/snapshots/codegen_misc.snap index 8b352e1ae54e6..04dbea639b924 100644 --- a/tasks/coverage/snapshots/codegen_misc.snap +++ b/tasks/coverage/snapshots/codegen_misc.snap @@ -1,5 +1,3 @@ codegen_misc Summary: AST Parsed : 53/53 (100.00%) -Positive Passed: 52/53 (98.11%) -Normal: tasks/coverage/misc/pass/let-optional-chaining.cjs - +Positive Passed: 53/53 (100.00%)