diff --git a/crates/oxc_semantic/src/unresolved_stack.rs b/crates/oxc_semantic/src/unresolved_stack.rs index 31a4d17cb307c..110f030d396b7 100644 --- a/crates/oxc_semantic/src/unresolved_stack.rs +++ b/crates/oxc_semantic/src/unresolved_stack.rs @@ -38,7 +38,7 @@ impl UnresolvedReferencesStack { pub(crate) fn increment_scope_depth(&mut self) { self.current_scope_depth += 1; - // Grow stack if required to ensure `self.stack[self.depth]` is in bounds + // Grow stack if required to ensure `self.stack[self.current_scope_depth]` is in bounds if self.stack.len() <= self.current_scope_depth { self.stack.push(UnresolvedReferences::default()); }