diff --git a/crates/oxc_parser/src/modifiers.rs b/crates/oxc_parser/src/modifiers.rs index 248dff82d5eb9..278154a1ec33d 100644 --- a/crates/oxc_parser/src/modifiers.rs +++ b/crates/oxc_parser/src/modifiers.rs @@ -318,7 +318,7 @@ impl<'a> ParserImpl<'a> { } match self.cur_kind() { - Kind::Const => !self.peek_token().is_on_new_line && self.peek_kind() == Kind::Enum, + Kind::Const => self.peek_kind() == Kind::Enum, Kind::Export => { self.bump_any(); match self.cur_kind() { diff --git a/tasks/coverage/misc/pass/oxc-8193.ts b/tasks/coverage/misc/pass/oxc-8193.ts new file mode 100644 index 0000000000000..179e3b0abe4b1 --- /dev/null +++ b/tasks/coverage/misc/pass/oxc-8193.ts @@ -0,0 +1,2 @@ +const +enum A {} diff --git a/tasks/coverage/snapshots/codegen_misc.snap b/tasks/coverage/snapshots/codegen_misc.snap index c5be53e729ad4..743760e5cd4d2 100644 --- a/tasks/coverage/snapshots/codegen_misc.snap +++ b/tasks/coverage/snapshots/codegen_misc.snap @@ -1,3 +1,3 @@ codegen_misc Summary: -AST Parsed : 30/30 (100.00%) -Positive Passed: 30/30 (100.00%) +AST Parsed : 31/31 (100.00%) +Positive Passed: 31/31 (100.00%) diff --git a/tasks/coverage/snapshots/parser_misc.snap b/tasks/coverage/snapshots/parser_misc.snap index 75662028a5ff2..043138c0b643f 100644 --- a/tasks/coverage/snapshots/parser_misc.snap +++ b/tasks/coverage/snapshots/parser_misc.snap @@ -1,6 +1,6 @@ parser_misc Summary: -AST Parsed : 30/30 (100.00%) -Positive Passed: 30/30 (100.00%) +AST Parsed : 31/31 (100.00%) +Positive Passed: 31/31 (100.00%) Negative Passed: 26/26 (100.00%) × Unexpected token diff --git a/tasks/coverage/snapshots/semantic_misc.snap b/tasks/coverage/snapshots/semantic_misc.snap index 42575c7a4c573..88ea6ce74b437 100644 --- a/tasks/coverage/snapshots/semantic_misc.snap +++ b/tasks/coverage/snapshots/semantic_misc.snap @@ -1,6 +1,6 @@ semantic_misc Summary: -AST Parsed : 30/30 (100.00%) -Positive Passed: 19/30 (63.33%) +AST Parsed : 31/31 (100.00%) +Positive Passed: 19/31 (61.29%) tasks/coverage/misc/pass/oxc-1288.ts semantic error: Bindings mismatch: after transform: ScopeId(0): ["from"] @@ -170,3 +170,11 @@ semantic error: Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2)] +tasks/coverage/misc/pass/oxc-8193.ts +semantic error: Scope flags mismatch: +after transform: ScopeId(1): ScopeFlags(StrictMode) +rebuilt : ScopeId(1): ScopeFlags(StrictMode | Function) +Symbol flags mismatch for "A": +after transform: SymbolId(0): SymbolFlags(ConstEnum) +rebuilt : SymbolId(0): SymbolFlags(FunctionScopedVariable) + diff --git a/tasks/coverage/snapshots/transformer_misc.snap b/tasks/coverage/snapshots/transformer_misc.snap index f3fd86288b0f8..df584875df17e 100644 --- a/tasks/coverage/snapshots/transformer_misc.snap +++ b/tasks/coverage/snapshots/transformer_misc.snap @@ -1,3 +1,3 @@ transformer_misc Summary: -AST Parsed : 30/30 (100.00%) -Positive Passed: 30/30 (100.00%) +AST Parsed : 31/31 (100.00%) +Positive Passed: 31/31 (100.00%)