summaryrefslogtreecommitdiff
path: root/testsuite/tests/printing-types/disambiguation.ml
blob: 12e244ec5524221e198ffe6049d91d09f1a5790c (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
(* TEST
   * expect
*)

type 'a x = private [> `x] as 'a;;
[%%expect {|
Line 1:
Error: Type declarations do not match:
         type !'a x = private [> `x ] constraint 'a = 'a x
       is not included in
         type 'a x
       Their parameters differ
       The type 'b x as 'b is not equal to the type 'a
|}, Principal{|
Line 1:
Error: Type declarations do not match:
         type !'a x = private 'a constraint 'a = [> `x ]
       is not included in
         type 'a x
       Their parameters differ
       The type [> `x ] is not equal to the type 'a
|}];;


type int;;
[%%expect {|
type int
|}];;

let x = 0;;
[%%expect {|
val x : int/2 = 0
|}];;


type float;;
[%%expect {|
type float
|}];;

0.;;
[%%expect {|
- : float/2 = 0.
|}];;