summaryrefslogtreecommitdiff
path: root/testsuite/tests/typing-modules/pr5911.ml
blob: 44f141e583162a595305f8593637220872976ce6 (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
(* TEST
 expect;
*)

module type S = sig
 type t
 val x : t
end;;

module Good (X : S with type t := unit) = struct
 let () = X.x
end;;
[%%expect{|
module type S = sig type t val x : t end
module Good : functor (X : sig val x : unit end) -> sig end
|}];;

module type T = sig module M : S end;;

module Bad (X : T with type M.t = unit) = struct
 let () = X.M.x
end;;
[%%expect{|
module type T = sig module M : S end
module Bad :
  functor (X : sig module M : sig type t = unit val x : t end end) -> sig end
|}];;