From f7b9ada372b8e343274d609f46339466fda13fd0 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:32:26 +0000 Subject: [PATCH] refactor(semantic): `Program` visitor leave scope before node (#4369) Bring the order of calls in `SemanticBuilder::visit_program` into line with `Visit`'s `walk_program`. --- crates/oxc_semantic/src/builder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_semantic/src/builder.rs b/crates/oxc_semantic/src/builder.rs index a9245cbd1..3822634a5 100644 --- a/crates/oxc_semantic/src/builder.rs +++ b/crates/oxc_semantic/src/builder.rs @@ -563,8 +563,8 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> { control_flow!(self, |cfg| cfg.release_error_harness(error_harness)); /* cfg */ - self.leave_node(kind); self.leave_scope(); + self.leave_node(kind); } fn visit_break_statement(&mut self, stmt: &BreakStatement<'a>) {