Skip to content

Commit

Permalink
refactor(transformer/arrow-functions): reorder assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Jan 9, 2025
1 parent 335065d commit fda6a79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_transformer/src/common/arrow_function_converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>) {
Expand Down

0 comments on commit fda6a79

Please sign in to comment.