Debian Codegraph @

testsuite/tests/tool-toplevel/redefinition_hints.compilers.reference

raw
1 module Empty : sig end
2 type u = A
3 type v = B
4 module type S = sig end
5 val m : (module S) = <module>
6 module M : sig type 'a t = X of 'a end
7 val x : (u * v * (module S)) M.t = M.X (A, B, <module>)
8 module type S = sig end
9 val m : (module S) = <module>
10 type u = A
11 type v = B
12 module M : sig type 'a t = X of 'a end
13 val y : (u * v * (module S)) M.t = M.X (A, B, <module>)
14 Line 2, characters 4-5:
15 2 | x = y;;
16 ^
17 Error: The value y has type (u * v * (module S)) M.t
18 but an expression was expected of type
19 (u/2 * v/2 * (module S/2)) M/2.t
20 Hint: The types v and u have been defined multiple times in this
21 toplevel session. Some toplevel values still refer to old versions
22 of those types. Did you try to redefine them?
23 Hint: The module M has been defined multiple times in this toplevel
24 session. Some toplevel values still refer to old versions of this
25 module. Did you try to redefine them?
26 Hint: The module type S has been defined multiple times in this
27 toplevel session. Some toplevel values still refer to old versions
28 of this module type. Did you try to redefine them?
29 type a = A
30 val a : a = A
31 type a = A
32 val b : a = A
33 type a = A
34 val c : a = A
35 Line 2, characters 4-5:
36 2 | a = b;;
37 ^
38 Error: The value b has type a/2 but an expression was expected of type a/3
39 Hint: The type a has been defined multiple times in this toplevel
40 session. Some toplevel values still refer to old versions of this
41 type. Did you try to redefine them?
42 Line 1, characters 4-5:
43 1 | a = c;;
44 ^
45 Error: The value c has type a but an expression was expected of type a/3
46 Hint: The type a has been defined multiple times in this toplevel
47 session. Some toplevel values still refer to old versions of this
48 type. Did you try to redefine them?
49 Line 1, characters 4-5:
50 1 | b = c;;
51 ^
52 Error: The value c has type a but an expression was expected of type a/2
53 Hint: The type a has been defined multiple times in this toplevel
54 session. Some toplevel values still refer to old versions of this
55 type. Did you try to redefine them?