File tree 2 files changed +2
-21
lines changed
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 =
50
50
" Only one component definition is allowed for each module. Move to a \
51
51
submodule or other file if necessary."
52
52
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
-
69
53
let async_component ~async expr =
70
54
if async then
71
55
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 =
927
927
let map_binding ~config ~empty_loc ~pstr_loc ~file_name ~rec_flag binding =
928
928
if Jsx_common. has_attr_on_binding Jsx_common. has_attr binding then (
929
929
check_multiple_components ~config ~loc: pstr_loc;
930
- let binding = Jsx_common. remove_arity binding in
931
930
let core_type_of_attr =
932
931
Jsx_common. core_type_of_attrs binding.pvb_attributes
933
932
in
@@ -1173,12 +1172,10 @@ let map_binding ~config ~empty_loc ~pstr_loc ~file_name ~rec_flag binding =
1173
1172
(Some props_record_type, binding, new_binding))
1174
1173
else if Jsx_common. has_attr_on_binding Jsx_common. has_attr_with_props binding
1175
1174
then
1176
- let modified_binding = Jsx_common. remove_arity binding in
1177
1175
let modified_binding =
1178
1176
{
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;
1182
1179
}
1183
1180
in
1184
1181
let fn_name = get_fn_name modified_binding.pvb_pat in
You can’t perform that action at this time.
0 commit comments