diff --git a/crates/oxc_transformer/src/es2022/class_properties.rs b/crates/oxc_transformer/src/es2022/class_properties.rs index 569029e420e0cb..18de438c73cf55 100644 --- a/crates/oxc_transformer/src/es2022/class_properties.rs +++ b/crates/oxc_transformer/src/es2022/class_properties.rs @@ -695,7 +695,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> { } }; - let arguments = ctx.ast.vec_from_iter([ + let arguments = ctx.ast.vec_from_array([ Argument::from(assignee), Argument::from(key), Argument::from(value), @@ -713,7 +713,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> { ) -> Expression<'a> { let private_props = self.private_props_stack.last().unwrap(); let prop = &private_props[&ident.name]; - let arguments = ctx.ast.vec_from_iter([ + let arguments = ctx.ast.vec_from_array([ Argument::from(ctx.ast.expression_this(SPAN)), Argument::from(prop.binding.create_read_expression(ctx)), Argument::from(value), @@ -976,7 +976,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> { // It should already be initialized anyway. // Need to store `class_name` on stack, because could be from an enclosing class. let class_binding = self.initialize_class_name_binding(ctx); - let arguments = ctx.ast.vec_from_iter([ + let arguments = ctx.ast.vec_from_array([ Argument::from(class_binding.create_read_expression(ctx)), Argument::from(field_expr.object), Argument::from(prop_ident), @@ -985,7 +985,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> { } else { // `_classPrivateFieldGet(_prop, this)` let arguments = [Argument::from(prop_ident), Argument::from(field_expr.object)]; - let arguments = ctx.ast.vec_from_iter(arguments); + let arguments = ctx.ast.vec_from_array(arguments); (Helper::ClassPrivateFieldGet, arguments) };