Skip to content

Commit

Permalink
fix(semantic): reference flags not correctly resolved when after an e…
Browse files Browse the repository at this point in the history
…xport stmt
  • Loading branch information
camc314 committed Dec 27, 2024
1 parent 6b51e6d commit cdd121b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,14 @@ fn test() {
// ",
// None,
// ),
(
"import { Bar } from './bar';
export type { Baz } from './baz';
export class Foo extends Bar {}
",
None,
),
];

let fail = vec![
Expand Down
1 change: 1 addition & 0 deletions crates/oxc_semantic/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1880,6 +1880,7 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> {
if let Some(with_clause) = &it.with_clause {
self.visit_with_clause(with_clause);
}
self.current_reference_flags = ReferenceFlags::None;
self.leave_node(kind);
}

Expand Down

0 comments on commit cdd121b

Please sign in to comment.