Source

compiler-libs-hack / ocaml / testsuite / tests / typing-gadts / pr5997.ml.reference

Full commit

#       type (_, _) comp = Eq : ('a, 'a) comp | Diff : ('a, 'b) comp
#   module U : sig type t = T end
#               module M : sig type t = T val comp : (U.t, t) comp end
#   Characters 1-34:
  match M.comp with | Diff -> false;;
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
Eq
Exception: Match_failure ("//toplevel//", 13, 0).
#   module U : sig type t = { x : int; } end
#               module M : sig type t = { x : int; } val comp : (U.t, t) comp end
#   Characters 1-34:
  match M.comp with | Diff -> false;;
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
Eq
Exception: Match_failure ("//toplevel//", 22, 0).
#