diff options
Diffstat (limited to 'testsuite/tests/typing-modules/Test.ml.principal.reference')
-rw-r--r-- | testsuite/tests/typing-modules/Test.ml.principal.reference | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/typing-modules/Test.ml.principal.reference b/testsuite/tests/typing-modules/Test.ml.principal.reference index c4ad0a05bc..eebe307ed8 100644 --- a/testsuite/tests/typing-modules/Test.ml.principal.reference +++ b/testsuite/tests/typing-modules/Test.ml.principal.reference @@ -8,4 +8,24 @@ class type c = object method m : [ `A ] t end # module M : sig val v : (#c as 'a) -> 'a end # val id : 'a -> 'a = <fun> # val ko : 'a -> unit = <fun> +# Characters 64-99: + struct type +'a t = private int end + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Error: Signature mismatch: + Modules do not match: + sig type +'a t = private int end + is not included in + sig type -'a t = private int end + Type declarations do not match: + type +'a t = private int + 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. # |