From dddbd299d0158c82476b0dbdb528957b5d9fca50 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Thu, 9 Jan 2025 12:23:54 +0000 Subject: [PATCH] refactor(transformer/arrow-functions): reorder assertions (#8386) Nit. Group assertions about the same thing together. --- crates/oxc_transformer/src/common/arrow_function_converter.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_transformer/src/common/arrow_function_converter.rs b/crates/oxc_transformer/src/common/arrow_function_converter.rs index af5502f834efa..267f030b45ca3 100644 --- a/crates/oxc_transformer/src/common/arrow_function_converter.rs +++ b/crates/oxc_transformer/src/common/arrow_function_converter.rs @@ -196,12 +196,12 @@ impl<'a> Traverse<'a> for ArrowFunctionConverter<'a> { debug_assert!(self.arguments_var_stack.len() == 1); debug_assert!(self.arguments_var_stack.last().is_none()); debug_assert!(self.constructor_super_stack.len() == 1); - debug_assert!(self.super_methods_stack.len() == 1); - debug_assert!(self.super_methods_stack.last().is_none()); // TODO: This assertion currently failing because we don't handle `super` in arrow functions // in class static properties correctly. // e.g. `class C { static f = async () => super.prop; }` // debug_assert!(self.constructor_super_stack.last() == &false); + debug_assert!(self.super_methods_stack.len() == 1); + debug_assert!(self.super_methods_stack.last().is_none()); } fn enter_function(&mut self, func: &mut Function<'a>, ctx: &mut TraverseCtx<'a>) {