Skip to content

Commit 56a2a18

Browse files
committed
remove infinte loop in builtin ppx
1 parent 7a18bdf commit 56a2a18

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

compiler/frontend/bs_builtin_ppx.ml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,6 @@ let expr_mapper ~async_context ~in_function_def (self : mapper)
110110
| Pexp_constant (Pconst_integer (s, Some 'l')) ->
111111
{e with pexp_desc = Pexp_constant (Pconst_integer (s, None))}
112112
(* End rewriting *)
113-
| _
114-
when Ast_uncurried.expr_is_uncurried_fun e
115-
&&
116-
match
117-
Ast_attributes.process_attributes_rev
118-
(Ast_uncurried.expr_extract_uncurried_fun e).pexp_attributes
119-
with
120-
| Meth_callback _, _ -> true
121-
| _ -> false ->
122-
(* Treat @this (. x, y, z) => ... just like @this (x, y, z) => ... *)
123-
let fun_expr = Ast_uncurried.expr_extract_uncurried_fun e in
124-
self.expr self fun_expr
125113
| Pexp_newtype (s, body) ->
126114
let async = Ast_attributes.has_async_payload e.pexp_attributes <> None in
127115
let body = Ast_async.add_async_attribute ~async body in

tests/tests/src/UncurriedExternals.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ let StandardNotation = {
6464
set: StandardNotation_set
6565
};
6666

67-
function methodWithAsync() {
67+
function methodWithAsync(param) {
6868
let $$this = this ;
69-
return async arg => $$this + arg | 0;
69+
return (async arg => $$this + arg | 0)(param);
7070
}
7171

7272
export {

0 commit comments

Comments
 (0)