summaryrefslogtreecommitdiff
path: root/testsuite/tests/typing-warnings/pr6587.ml
blob: ba4b14ea1e05923100c4ef320aea3d8ef461041a (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
(* TEST
 flags = " -w +A -strict-sequence ";
 expect;
*)


module A: sig val f: fpclass -> fpclass end =
  struct
    let f _ = FP_normal
  end;;
[%%expect {|
module A : sig val f : fpclass -> fpclass end
|}]

type fpclass = A ;;
[%%expect {|
type fpclass = A
|}]

module B: sig val f: fpclass -> fpclass end =
  struct
    let f A = FP_normal
  end
    ;;
[%%expect {|
Lines 2-4, characters 2-5:
2 | ..struct
3 |     let f A = FP_normal
4 |   end
Error: Signature mismatch:
       Modules do not match:
         sig val f : fpclass -> Stdlib.fpclass end
       is not included in
         sig val f : fpclass -> fpclass end
       Values do not match:
         val f : fpclass -> Stdlib.fpclass
       is not included in
         val f : fpclass -> fpclass
       The type fpclass -> Stdlib.fpclass is not compatible with the type
         fpclass -> fpclass
       Type Stdlib.fpclass is not compatible with type fpclass
|}]