From 8e43eeffe7d959fc2d94d7e9038d67d5788feac3 Mon Sep 17 00:00:00 2001 From: Dunqing Date: Sat, 20 Jan 2024 20:59:11 +0800 Subject: [PATCH] refactor(semantic): improve declare symbol logic in FormalParameters (#2088) --- crates/oxc_semantic/src/binder.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/oxc_semantic/src/binder.rs b/crates/oxc_semantic/src/binder.rs index df49e6b98c0e9..f659b1dd9ad83 100644 --- a/crates/oxc_semantic/src/binder.rs +++ b/crates/oxc_semantic/src/binder.rs @@ -207,12 +207,12 @@ impl<'a> Binder for FormalParameters<'a> { SymbolFlags::FunctionScopedVariableExcludes }; let is_signature = self.kind == FormalParameterKind::Signature; - self.bound_names(&mut |ident| { - if !is_signature { + if !is_signature { + self.bound_names(&mut |ident| { let symbol_id = builder.declare_symbol(ident.span, &ident.name, includes, excludes); ident.symbol_id.set(Some(symbol_id)); - } - }); + }); + } } }