diff --git a/crates/oxc_parser/src/js/class.rs b/crates/oxc_parser/src/js/class.rs index c61c580eb0bf8..b4e41b0bdff18 100644 --- a/crates/oxc_parser/src/js/class.rs +++ b/crates/oxc_parser/src/js/class.rs @@ -512,12 +512,12 @@ impl<'a> ParserImpl<'a> { let type_annotation = if self.is_ts { self.parse_ts_type_annotation()? } else { None }; let value = self.eat(Kind::Eq).then(|| self.parse_assignment_expression_or_higher()).transpose()?; + self.asi()?; let r#type = if r#abstract { AccessorPropertyType::TSAbstractAccessorProperty } else { AccessorPropertyType::AccessorProperty }; - let decorators = self.consume_decorators(); Ok(self.ast.class_element_accessor_property( self.end_span(span), diff --git a/tasks/coverage/snapshots/parser_typescript.snap b/tasks/coverage/snapshots/parser_typescript.snap index 11819841e8faa..0ce0f5c68b6e9 100644 --- a/tasks/coverage/snapshots/parser_typescript.snap +++ b/tasks/coverage/snapshots/parser_typescript.snap @@ -15737,13 +15737,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private ╰──── help: Remove the duplicate modifier. - × Unexpected token + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[typescript/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts:10:15] 9 │ accessor static h: any; 10 │ accessor i() {} - · ─ + · ▲ 11 │ accessor get j() { return false; } ╰──── + help: Try insert a semicolon here × Expected `,` but found `*` ╭─[typescript/tests/cases/conformance/classes/propertyMemberDeclarations/canFollowGetSetKeyword.ts:11:5]