@@ -896,22 +896,22 @@ let handle_attributes (loc : Bs_loc.t) (type_annotation : Parsetree.core_type)
896
896
let arg_label = param_type.label in
897
897
let ty = param_type.ty in
898
898
(if i = 0 && splice then
899
- match arg_label with
900
- | Optional _ ->
901
- Location. raise_errorf ~loc
902
- " %@variadic expect the last type to be a non optional"
903
- | Labelled _ | Nolabel -> (
904
- if ty.ptyp_desc = Ptyp_any then
899
+ match arg_label with
900
+ | Optional _ ->
905
901
Location. raise_errorf ~loc
906
- " %@variadic expect the last type to be an array" ;
907
- if spec_of_ptyp true ty <> Nothing then
908
- Location. raise_errorf ~loc
909
- " %@variadic expect the last type to be an array" ;
910
- match ty.ptyp_desc with
911
- | Ptyp_constr ({txt = Lident "array" ; _} , [_ ]) -> ()
912
- | _ ->
913
- Location. raise_errorf ~loc
914
- " %@variadic expect the last type to be an array" ));
902
+ " %@variadic expect the last type to be a non optional"
903
+ | Labelled _ | Nolabel -> (
904
+ if ty.ptyp_desc = Ptyp_any then
905
+ Location. raise_errorf ~loc
906
+ " %@variadic expect the last type to be an array" ;
907
+ if spec_of_ptyp true ty <> Nothing then
908
+ Location. raise_errorf ~loc
909
+ " %@variadic expect the last type to be an array" ;
910
+ match ty.ptyp_desc with
911
+ | Ptyp_constr ({txt = Lident "array" ; _} , [_ ]) -> ()
912
+ | _ ->
913
+ Location. raise_errorf ~loc
914
+ " %@variadic expect the last type to be an array" ));
915
915
let ( (arg_label : External_arg_spec.label_noname ),
916
916
arg_type,
917
917
new_arg_types ) =
@@ -988,8 +988,7 @@ let pval_prim_of_option_labels (labels : (bool * string Asttypes.loc) list)
988
988
(ends_with_unit : bool ) =
989
989
let arg_kinds =
990
990
Ext_list. fold_right labels
991
- (if ends_with_unit then [External_arg_spec. empty_kind Extern_unit ]
992
- else [] )
991
+ (if ends_with_unit then [External_arg_spec. empty_kind Extern_unit ] else [] )
993
992
(fun (is_option , p ) arg_kinds ->
994
993
let label_name = p.txt in
995
994
let obj_arg_label =
0 commit comments