Debian Codegraph @

test/instrument/recent/exception-pattern.t

raw
1 Exception patterns under or-pattern.
2
3 $ bash ../test.sh <<'EOF'
4 > let _ =
5 > match () with
6 > | () -> ()
7 > | exception Exit | exception Failure _ -> ()
8 > EOF
9 let _ =
10 match () with
11 | (exception (Exit as ___bisect_matched_value___))
12 | (exception (Failure _ as ___bisect_matched_value___)) ->
13 (match[@ocaml.warning "-4-8-9-11-26-27-28-33"]
14 ___bisect_matched_value___
15 with
16 | Exit ->
17 ___bisect_visit___ 1;
18 ()
19 | Failure _ ->
20 ___bisect_visit___ 2;
21 ()
22 | _ -> ());
23 ()
24 | () ->
25 ___bisect_visit___ 0;
26 ()
27
28
29 Exception pattern under type constraint.
30
31 $ bash ../test.sh <<'EOF'
32 > let _ =
33 > match () with
34 > | () -> ()
35 > | (exception (Exit | Failure _) : unit) -> ()
36 > EOF
37 let _ =
38 match () with
39 | ((exception ((Exit | Failure _) as ___bisect_matched_value___)) : unit) ->
40 (match[@ocaml.warning "-4-8-9-11-26-27-28-33"]
41 ___bisect_matched_value___
42 with
43 | Exit ->
44 ___bisect_visit___ 1;
45 ()
46 | Failure _ ->
47 ___bisect_visit___ 2;
48 ()
49 | _ -> ());
50 ()
51 | () ->
52 ___bisect_visit___ 0;
53 ()