blob: 7c56ca2f05a4de6d0ea88dd90cf17bc6c01bcc67 (
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
|
(* TEST
* expect
*)
let f x =
match x with
| _ -> ()
| exception _ -> .
;;
[%%expect{|
Line 4, characters 14-15:
4 | | exception _ -> .
^
Error: This match case could not be refuted.
Here is an example of a value that would reach it: _
|}]
;;
let f x =
match x with
| _ -> ()
| None | exception _ -> .
;;
[%%expect{|
Line 4, characters 21-22:
4 | | None | exception _ -> .
^
Error: This match case could not be refuted.
Here is an example of a value that would reach it: _
|}]
;;
let f x =
match x with
| _ -> ()
| exception Not_found | None -> .
;;
[%%expect{|
Line 4, characters 14-23:
4 | | exception Not_found | None -> .
^^^^^^^^^
Error: This match case could not be refuted.
Here is an example of a value that would reach it: Not_found
|}]
;;
let f x =
match x with
| _ | exception _ -> ()
| exception Not_found -> .
;;
[%%expect{|
val f : 'a -> unit = <fun>
|}]
;;
|