@@ -406014,26 +406014,29 @@ let typ_mapper (self : mapper) (typ : Parsetree.core_type) =
406014
406014
Ast_core_type_class_type.typ_mapper self typ
406015
406015
406016
406016
let class_type_mapper (self : mapper) ({pcty_attributes; pcty_loc} as ctd : Parsetree.class_type) =
406017
- match Ast_attributes.process_bs pcty_attributes with
406018
- | false, _ ->
406019
- default_mapper.class_type self ctd
406020
- | true, pcty_attributes ->
406021
- (match ctd.pcty_desc with
406022
- | Pcty_signature ({pcsig_self; pcsig_fields })
406023
- ->
406024
- let pcsig_self = self.typ self pcsig_self in
406025
- {ctd with
406026
- pcty_desc = Pcty_signature {
406027
- pcsig_self ;
406028
- pcsig_fields = Ast_core_type_class_type.handle_class_type_fields self pcsig_fields
406029
- };
406030
- pcty_attributes
406031
- }
406032
- | Pcty_open _ (* let open M in CT *)
406033
- | Pcty_constr _
406034
- | Pcty_extension _
406035
- | Pcty_arrow _ ->
406036
- Location.raise_errorf ~loc:pcty_loc "invalid or unused attribute `bs`")
406017
+ let pcty_attributes =
406018
+ match Ast_attributes.process_bs pcty_attributes with
406019
+ | false, _ ->
406020
+ pcty_attributes
406021
+ | true, pcty_attributes ->
406022
+ Location.prerr_warning pcty_loc (Bs_ffi_warning "Here @bs attribute is not needed any more.");
406023
+ pcty_attributes in
406024
+ (match ctd.pcty_desc with
406025
+ | Pcty_signature ({pcsig_self; pcsig_fields })
406026
+ ->
406027
+ let pcsig_self = self.typ self pcsig_self in
406028
+ {ctd with
406029
+ pcty_desc = Pcty_signature {
406030
+ pcsig_self ;
406031
+ pcsig_fields = Ast_core_type_class_type.handle_class_type_fields self pcsig_fields
406032
+ };
406033
+ pcty_attributes
406034
+ }
406035
+ | Pcty_open _ (* let open M in CT *)
406036
+ | Pcty_constr _
406037
+ | Pcty_extension _
406038
+ | Pcty_arrow _ ->
406039
+ default_mapper.class_type self ctd)
406037
406040
(* {[class x : int -> object
406038
406041
end [@bs]
406039
406042
]}
0 commit comments