Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/oxc_estree/src/serialize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl<C: Config, F: Formatter> ESTreeSerializer<C, F> {

node.serialize(&mut self);

debug_assert_eq!(self.trace_path.len(), 1);
debug_assert!(self.trace_path.is_exhausted());
debug_assert_eq!(self.trace_path[0], TracePathPart::DUMMY);

self.buffer.print_str("\n,\"fixes\":[");
Expand Down
10 changes: 5 additions & 5 deletions crates/oxc_transformer/src/common/arrow_function_converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,18 @@ impl<'a> Traverse<'a, TransformState<'a>> for ArrowFunctionConverter<'a> {
ctx,
);

debug_assert!(self.this_var_stack.len() == 1);
debug_assert!(self.this_var_stack.is_exhausted());
debug_assert!(self.this_var_stack.first().is_none());
debug_assert!(self.arguments_var_stack.len() == 1);
debug_assert!(self.arguments_var_stack.is_exhausted());
debug_assert!(self.arguments_var_stack.first().is_none());
debug_assert!(self.constructor_super_stack.len() == 1);
debug_assert!(self.constructor_super_stack.is_exhausted());
// 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 = () => super.prop; }`
// debug_assert!(self.constructor_super_stack.first() == &false);
debug_assert!(self.super_methods_stack.len() == 1);
debug_assert!(self.super_methods_stack.is_exhausted());
debug_assert!(self.super_methods_stack.first().is_empty());
debug_assert!(self.super_needs_transform_stack.len() == 1);
debug_assert!(self.super_needs_transform_stack.is_exhausted());
debug_assert!(self.super_needs_transform_stack.first() == &false);
}

Expand Down
4 changes: 2 additions & 2 deletions crates/oxc_transformer/src/common/var_declarations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ impl<'a> VarDeclarationsStore<'a> {
.insert_statements(var_statement.into_iter().chain(let_statement));
}

// Check stack is emptied
// Check stack is exhausted
let stack = self.stack.borrow();
debug_assert!(stack.len() == 1);
debug_assert!(stack.is_exhausted());
debug_assert!(stack.last().is_none());
}

Expand Down
Loading