blob: 34635c8d39f3d705d78aff756d18ca76052a66e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
(* TEST_BELOW
(* Blank lines added here to preserve locations. *)
*)
(** Test unused opens, in particular in presence of
pattern open *)
module M = struct end
module N = struct type t = A | B end
module R = struct type r = {x: int} end
let f M.(x) = x (* useless open *)
let g N.(A|B) = () (* used open *)
let h R.{x} = R.{x}
open N (* used open *)
let i (A|B) = B
open! M (* useless open! *)
open M (* useless open *)
(* TEST
flags = "-w +A-70";
setup-ocamlc.byte-build-env;
compile_only = "true";
ocamlc.byte;
check-ocamlc.byte-output;
*)
|