refactor(transformer/arrow-functions): reorder assertions (#8386)

Nit. Group assertions about the same thing together.
This commit is contained in:
overlookmotel 2025-01-09 12:23:54 +00:00
parent 335065d8c8
commit dddbd299d0

View file

@ -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>) {