Fix PR#6005

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13646 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jacques Garrigue 2013-05-03 14:39:56 +00:00
parent 67e18e5c4d
commit 6ce0823710
3 changed files with 20 additions and 0 deletions

View File

@ -44,3 +44,9 @@ let ko = let module M = struct end in fun _ -> ();;
module M : sig type -'a t = private int end =
struct type +'a t = private int end
;;
(* PR#6005 *)
module type A = sig type t = X of int end;;
type u = X of bool;;
module type B = A with type t = u;; (* fail *)

View File

@ -21,4 +21,11 @@ Error: Signature mismatch:
is not included in
type -'a t = private int
Their variances do not agree.
# module type A = sig type t = X of int end
# type u = X of bool
# Characters 23-33:
module type B = A with type t = u;; (* fail *)
^^^^^^^^^^
Error: This variant or record definition does not match that of type u
The types for field X are not equal.
#

View File

@ -21,4 +21,11 @@ Error: Signature mismatch:
is not included in
type -'a t = private int
Their variances do not agree.
# module type A = sig type t = X of int end
# type u = X of bool
# Characters 23-33:
module type B = A with type t = u;; (* fail *)
^^^^^^^^^^
Error: This variant or record definition does not match that of type u
The types for field X are not equal.
#