Skip to content

Commit b7ed630

Browse files
committed
clean up: avoid js_property
1 parent 7289eff commit b7ed630

File tree

4 files changed

+363
-357
lines changed

4 files changed

+363
-357
lines changed

jscomp/frontend/ast_exp_apply.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ let app_exp_mapper
177177
)
178178
;
179179
pexp_loc}
180-
(* f##paint *)
180+
(* f##paint
181+
TODO: this is not relevant: remove it later
182+
*)
181183
->
182184
sane_property_name_check pexp_loc name ;
183185
{ e with pexp_desc =

jscomp/frontend/ast_uncurry_apply.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ let method_apply loc
8686
Ext_list.map args (fun (lbl,e) ->
8787
Bs_syntaxerr.optional_err loc lbl;
8888
(lbl,self.expr self e)) in
89-
let fn = Exp.mk ~loc (Ast_util.js_property loc obj name) in
89+
let fn = Exp.send ~loc obj {txt = name;loc} in
9090
let args =
9191
match args with
9292
| [ Nolabel, {pexp_desc =
@@ -115,4 +115,4 @@ let uncurry_fn_apply loc self fn args =
115115

116116
let property_apply loc self obj name args
117117
= generic_apply loc self obj args
118-
(fun loc obj -> Exp.mk ~loc (Ast_util.js_property loc obj name))
118+
(fun loc obj -> Exp.send ~loc obj {txt = name; loc})

0 commit comments

Comments
 (0)