summaryrefslogtreecommitdiff
path: root/testsuite/tests/typing-polyvariants-bugs/pr5057a_bad.ml
blob: 85a11060c46e1c4cc98ffb91860ca90ea78657fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(* TEST_BELOW
(* Blank lines added here to preserve locations. *)




*)

(* This one should fail *)

let f flag =
  let module T = Set.Make(struct type t = int let compare = compare end) in
  let _ = match flag with `A -> 0 | `B r -> r in
  let _ = match flag with `A -> T.mem | `B r -> r in
  ()

(* TEST
 flags = " -w -a ";
 ocamlc_byte_exit_status = "2";
 setup-ocamlc.byte-build-env;
 ocamlc.byte;
 check-ocamlc.byte-output;
*)