blob: 3dbd0e67fff797da0f10ad4c031434619e1d5b2f (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
(* TEST
flags ="-keep-original-error-size"
* expect
*)
module A = struct
type a and b and c and d
end
module type S = sig
module B = A
end
module C : S = struct
module B = struct
type a and b and c and d and e and f and g and h
end
end
[%%expect {|
module A : sig type a and b and c and d end
module type S = sig module B = A end
Lines 9-13, characters 15-3:
9 | ...............struct
10 | module B = struct
11 | type a and b and c and d and e and f and g and h
12 | end
13 | end
Error: Signature mismatch:
...
In module B:
Modules do not match:
sig
type a = B.a
and b = B.b
and c = B.c
and d = B.d
and e = B.e
and f = B.f
and g = B.g
and h = B.h
end
is not included in
(module A)
|}]
module A = struct
type a and b and c and d
end
module type S = sig
module type B = sig
module C = A
end
end
module D : S = struct
module type B = sig
module C: sig
type a and b and c and d and e and f and g and h
end
end
end
[%%expect{|
module A : sig type a and b and c and d end
module type S = sig module type B = sig module C = A end end
Lines 11-17, characters 15-3:
11 | ...............struct
12 | module type B = sig
13 | module C: sig
14 | type a and b and c and d and e and f and g and h
15 | end
16 | end
17 | end
Error: Signature mismatch:
...
...
...
At position module type B = sig module C : <here> end
Modules do not match:
sig
type a = C.a
and b = C.b
and c = C.c
and d = C.d
and e = C.e
and f = C.f
and g = C.g
and h = C.h
end
is not included in
(module A)
|}]
|