Skip to content

Commit f3ebaff

Browse files
committed
avoid infinite loop
1 parent 5070930 commit f3ebaff

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

jscomp/frontend/bs_builtin_ppx.ml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,15 @@ let expr_mapper ~async_context ~in_function_def (self : mapper)
228228
let safe_module_type_lid : Ast_helper.lid =
229229
{txt = Lident (local_module_type_name txt); loc = me.pmod_loc}
230230
in
231-
self.expr self
232-
{
233-
e with
234-
pexp_desc =
235-
Pexp_letmodule
236-
( lid,
237-
Ast_await.create_await_module_expression
238-
~module_type_lid:safe_module_type_lid me,
239-
expr );
240-
}
231+
{
232+
e with
233+
pexp_desc =
234+
Pexp_letmodule
235+
( lid,
236+
Ast_await.create_await_module_expression
237+
~module_type_lid:safe_module_type_lid me,
238+
self.expr self expr );
239+
}
241240
(* module M = await (Belt.List: BeltList) *)
242241
| Pexp_letmodule
243242
( lid,
@@ -249,16 +248,15 @@ let expr_mapper ~async_context ~in_function_def (self : mapper)
249248
} as me),
250249
expr )
251250
when Res_parsetree_viewer.hasAwaitAttribute pmod_attributes ->
252-
self.expr self
253-
{
254-
e with
255-
pexp_desc =
256-
Pexp_letmodule
257-
( lid,
258-
Ast_await.create_await_module_expression ~module_type_lid:mtyp_lid
259-
me,
260-
expr );
261-
}
251+
{
252+
e with
253+
pexp_desc =
254+
Pexp_letmodule
255+
( lid,
256+
Ast_await.create_await_module_expression ~module_type_lid:mtyp_lid
257+
me,
258+
self.expr self expr );
259+
}
262260
| _ -> default_expr_mapper self e
263261

264262
let expr_mapper ~async_context ~in_function_def (self : mapper)

0 commit comments

Comments
 (0)