Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions crates/oxc_semantic/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1925,6 +1925,15 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> {
self.visit_expression(&it.expression);
self.leave_node(kind);
}

fn visit_catch_parameter(&mut self, it: &CatchParameter<'a>) {
let kind = AstKind::CatchParameter(self.alloc(it));
self.enter_node(kind);
self.visit_span(&it.span);
self.visit_binding_pattern(&it.pattern);
self.leave_node(kind);
self.resolve_references_for_current_scope();
}
}

impl<'a> SemanticBuilder<'a> {
Expand Down Expand Up @@ -2055,9 +2064,6 @@ impl<'a> SemanticBuilder<'a> {

fn leave_kind(&mut self, kind: AstKind<'a>) {
match kind {
AstKind::CatchParameter(_) => {
self.resolve_references_for_current_scope();
}
AstKind::TSTypeQuery(_) | AstKind::TSPropertySignature(_) => {
// Clear the reference flags that may have been set when entering the node.
self.current_reference_flags = ReferenceFlags::empty();
Expand Down
Loading