File tree Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -50,22 +50,6 @@ let raise_error_multiple_component ~loc =
5050 " Only one component definition is allowed for each module. Move to a \
5151 submodule or other file if necessary."
5252
53- let remove_arity binding =
54- let rec remove_arity_record expr =
55- match expr.pexp_desc with
56- | _ when Ast_uncurried. expr_is_uncurried_fun expr ->
57- Ast_uncurried. expr_extract_uncurried_fun expr
58- | Pexp_newtype (label , e ) ->
59- {expr with pexp_desc = Pexp_newtype (label, remove_arity_record e)}
60- | Pexp_apply (forward_ref , [(label , e )]) ->
61- {
62- expr with
63- pexp_desc = Pexp_apply (forward_ref, [(label, remove_arity_record e)]);
64- }
65- | _ -> expr
66- in
67- {binding with pvb_expr = remove_arity_record binding.pvb_expr}
68-
6953let async_component ~async expr =
7054 if async then
7155 let open Ast_helper in
Original file line number Diff line number Diff line change @@ -927,7 +927,6 @@ let vb_match_expr named_arg_list expr =
927927let map_binding ~config ~empty_loc ~pstr_loc ~file_name ~rec_flag binding =
928928 if Jsx_common. has_attr_on_binding Jsx_common. has_attr binding then (
929929 check_multiple_components ~config ~loc: pstr_loc;
930- let binding = Jsx_common. remove_arity binding in
931930 let core_type_of_attr =
932931 Jsx_common. core_type_of_attrs binding.pvb_attributes
933932 in
@@ -1173,12 +1172,10 @@ let map_binding ~config ~empty_loc ~pstr_loc ~file_name ~rec_flag binding =
11731172 (Some props_record_type, binding, new_binding))
11741173 else if Jsx_common. has_attr_on_binding Jsx_common. has_attr_with_props binding
11751174 then
1176- let modified_binding = Jsx_common. remove_arity binding in
11771175 let modified_binding =
11781176 {
1179- modified_binding with
1180- pvb_attributes =
1181- modified_binding.pvb_attributes |> List. filter other_attrs_pure;
1177+ binding with
1178+ pvb_attributes = binding.pvb_attributes |> List. filter other_attrs_pure;
11821179 }
11831180 in
11841181 let fn_name = get_fn_name modified_binding.pvb_pat in
You can’t perform that action at this time.
0 commit comments