@@ -54,7 +54,7 @@ use oxc_ast::{ast::*, NONE};
5454use oxc_span:: SPAN ;
5555use oxc_traverse:: { Ancestor , BoundIdentifier , MaybeBoundIdentifier , Traverse , TraverseCtx } ;
5656
57- use crate :: { utils:: ast_builder:: wrap_arrow_function_iife , TransformCtx } ;
57+ use crate :: { utils:: ast_builder:: wrap_expression_in_arrow_function_iife , TransformCtx } ;
5858
5959#[ derive( Debug ) ]
6060enum CallContext < ' a > {
@@ -283,7 +283,7 @@ impl<'a> OptionalChaining<'a, '_> {
283283 // To insert the temp binding in the correct scope, we wrap the expression with
284284 // an arrow function. During the chain expression transformation, the temp binding
285285 // will be inserted into the arrow function's body.
286- wrap_arrow_function_iife ( ctx. ast . move_expression ( expr) , ctx)
286+ wrap_expression_in_arrow_function_iife ( ctx. ast . move_expression ( expr) , ctx)
287287 } else {
288288 self . transform_chain_expression_impl ( false , expr, ctx)
289289 }
@@ -297,7 +297,7 @@ impl<'a> OptionalChaining<'a, '_> {
297297 ) {
298298 * expr = if self . is_inside_function_parameter {
299299 // Same as the above `transform_chain_expression` explanation
300- wrap_arrow_function_iife ( ctx. ast . move_expression ( expr) , ctx)
300+ wrap_expression_in_arrow_function_iife ( ctx. ast . move_expression ( expr) , ctx)
301301 } else {
302302 // Unfortunately no way to get compiler to see that this branch is provably unreachable.
303303 // We don't want to inline this function, to keep `enter_expression` as small as possible.
0 commit comments