@@ -54,7 +54,7 @@ use oxc_ast::{ast::*, NONE};
54
54
use oxc_span:: SPAN ;
55
55
use oxc_traverse:: { Ancestor , BoundIdentifier , MaybeBoundIdentifier , Traverse , TraverseCtx } ;
56
56
57
- use crate :: { utils:: ast_builder:: wrap_arrow_function_iife , TransformCtx } ;
57
+ use crate :: { utils:: ast_builder:: wrap_expression_in_arrow_function_iife , TransformCtx } ;
58
58
59
59
#[ derive( Debug ) ]
60
60
enum CallContext < ' a > {
@@ -283,7 +283,7 @@ impl<'a> OptionalChaining<'a, '_> {
283
283
// To insert the temp binding in the correct scope, we wrap the expression with
284
284
// an arrow function. During the chain expression transformation, the temp binding
285
285
// 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)
287
287
} else {
288
288
self . transform_chain_expression_impl ( false , expr, ctx)
289
289
}
@@ -297,7 +297,7 @@ impl<'a> OptionalChaining<'a, '_> {
297
297
) {
298
298
* expr = if self . is_inside_function_parameter {
299
299
// 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)
301
301
} else {
302
302
// Unfortunately no way to get compiler to see that this branch is provably unreachable.
303
303
// We don't want to inline this function, to keep `enter_expression` as small as possible.
0 commit comments