Skip to content

Commit ce3612c

Browse files
committed
ppx_js: attribute fixes
Simpler code + make sure we don't lose any existing attribute.
1 parent c5bfc46 commit ce3612c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ppx/ppx_js/lib_internal/ppx_js_internal.ml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ let method_call ~loc ~apply_loc obj (meth, meth_loc) args =
339339
in
340340
Exp.apply
341341
~loc:apply_loc
342-
{ invoker with pexp_attributes = [ merlin_hide ] }
342+
{ invoker with pexp_attributes = merlin_hide :: invoker.pexp_attributes }
343343
((app_arg obj :: args)
344344
@ [ app_arg
345345
(Exp.fun_
@@ -408,11 +408,7 @@ let prop_get ~loc obj prop =
408408
]} *)
409409
let prop_set ~loc ~prop_loc obj prop value =
410410
let gloc = { obj.pexp_loc with Location.loc_ghost = true } in
411-
let obj =
412-
{ (Exp.constraint_ ~loc:gloc obj (open_t gloc)) with
413-
pexp_attributes = [ merlin_hide ]
414-
}
415-
in
411+
let obj = Exp.constraint_ ~attrs:[ merlin_hide ] ~loc:gloc obj (open_t gloc) in
416412
let invoker =
417413
invoker
418414
(fun args _tres ->

0 commit comments

Comments
 (0)