Skip to content

Commit b727709

Browse files
committed
remove warning Unsafe_poly_variant_type which no longer makes sense
1 parent b350b4c commit b727709

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

jscomp/common/bs_warnings.ml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,11 @@
2424

2525

2626

27-
type t =
28-
| Unsafe_poly_variant_type
29-
(* for users write code like this:
30-
{[ external f : [`a of int ] -> string = ""]}
31-
Here users forget about `[@bs.string]` or `[@bs.int]`
32-
*)
3327

3428

3529

36-
let to_string t =
37-
match t with
38-
| Unsafe_poly_variant_type
39-
->
40-
"Here a OCaml polymorphic variant type passed into JS, probably you forgot annotations like `[@bs.int]` or `[@bs.string]` "
4130

4231

43-
let prerr_bs_ffi_warning loc x =
44-
Location.prerr_warning loc (Bs_ffi_warning (to_string x))
45-
4632

4733

4834

jscomp/common/bs_warnings.mli

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2424

2525

26-
type t =
27-
| Unsafe_poly_variant_type
28-
29-
val prerr_bs_ffi_warning : Location.t -> t -> unit
3026

3127

3228
val warn_missing_primitive : Location.t -> string -> unit

jscomp/syntax/ast_external_process.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ let spec_of_ptyp
9090
begin match ptyp_desc with
9191
| Ptyp_constr ({txt = Lident "unit"; _}, [])
9292
-> if nolabel then Extern_unit else Nothing
93-
| Ptyp_variant _ ->
94-
Bs_warnings.prerr_bs_ffi_warning ptyp.ptyp_loc Unsafe_poly_variant_type;
95-
Nothing
9693
| _ ->
9794
Nothing
9895
end

0 commit comments

Comments
 (0)