11let _ =
22 match x with
3- | A -> begin match B with A -> fooooooooooooo end
4- | A -> begin match B with A -> fooooooooooooo | B -> fooooooooooooo end
5- | A -> begin
6- match B with
3+ | A ->
4+ begin match B with A -> fooooooooooooo
5+ end
6+ | A ->
7+ begin match B with A -> fooooooooooooo | B -> fooooooooooooo
8+ end
9+ | A ->
10+ begin match B with
711 | A -> fooooooooooooo
812 | B -> fooooooooooooo
913 | C -> fooooooooooooo
@@ -13,14 +17,14 @@ let _ =
1317
1418let _ =
1519 match x with
16- | A -> begin
17- match B with A -> fooooooooooooo
18- end
19- | A -> begin
20- match B with A -> fooooooooooooo | B -> fooooooooooooo
21- end
22- | A -> begin
23- match B with
20+ | A ->
21+ begin match B with A -> fooooooooooooo
22+ end
23+ | A ->
24+ begin match B with A -> fooooooooooooo | B -> fooooooooooooo
25+ end
26+ | A ->
27+ begin match B with
2428 | A ->
2529 fooooooooooooo
2630 | B ->
@@ -34,17 +38,17 @@ let _ =
3438
3539let _ =
3640 match x with
37- | A -> begin
38- match B with
41+ | A ->
42+ begin match B with
3943 | A -> fooooooooooooo
4044 end
41- | A -> begin
42- match B with
45+ | A ->
46+ begin match B with
4347 | A -> fooooooooooooo
4448 | B -> fooooooooooooo
4549 end
46- | A -> begin
47- match B with
50+ | A ->
51+ begin match B with
4852 | A -> fooooooooooooo
4953 | B -> fooooooooooooo
5054 | C -> fooooooooooooo
@@ -54,17 +58,17 @@ let _ =
5458
5559let _ =
5660 match x with
57- | A -> begin
58- match B with
61+ | A ->
62+ begin match B with
5963 | A -> fooooooooooooo
6064 end
61- | A -> begin
62- match B with
65+ | A ->
66+ begin match B with
6367 | A -> fooooooooooooo
6468 | B -> fooooooooooooo
6569 end
66- | A -> begin
67- match B with
70+ | A ->
71+ begin match B with
6872 | A -> fooooooooooooo
6973 | B -> fooooooooooooo
7074 | C -> fooooooooooooo
@@ -74,17 +78,17 @@ let _ =
7478
7579let _ =
7680 match x with
77- | A -> begin
78- match B with
81+ | A ->
82+ begin match B with
7983 | A -> fooooooooooooo
8084 end
81- | A -> begin
82- match B with
85+ | A ->
86+ begin match B with
8387 | A -> fooooooooooooo
8488 | B -> fooooooooooooo
8589 end
86- | A -> begin
87- match B with
90+ | A ->
91+ begin match B with
8892 | A -> fooooooooooooo
8993 | B -> fooooooooooooo
9094 | C -> fooooooooooooo
@@ -211,3 +215,48 @@ let a =
211215 | A -> f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
212216 | B -> bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
213217 end
218+
219+ let () =
220+ if true then
221+ begin match () with
222+ | () -> ()
223+ | aaaaaaaaaaaa -> aaaaaaaaaaa
224+ | bbbbbbbbbb -> bbbbbbbbbbbbbbbbb
225+ end
226+ else
227+ begin match () with
228+ | () -> ()
229+ | aaaaaaaaaaaa -> aaaaaaaaaaa
230+ | bbbbbbbbbb -> bbbbbbbbbbbbbbbbb
231+ end
232+
233+ let () =
234+ (* this is ugly but should never be used. *)
235+ if true then begin
236+ begin match () with
237+ | () -> ()
238+ | aaaaaaaaaaaa -> aaaaaaaaaaa
239+ | bbbbbbbbbb -> bbbbbbbbbbbbbbbbb
240+ end
241+ end
242+
243+ let () =
244+ (* Add a third one and it has indentation on `end`. *)
245+ if true then begin begin
246+ begin match () with
247+ | () -> ()
248+ | aaaaaaaaaaaa -> aaaaaaaaaaa
249+ | bbbbbbbbbb -> bbbbbbbbbbbbbbbbb
250+ end
251+ end
252+ end
253+
254+ let () =
255+ if true then begin
256+ ();
257+ begin match () with
258+ | () -> ()
259+ | aaaaaaaaaaaa -> aaaaaaaaaaa
260+ | bbbbbbbbbb -> bbbbbbbbbbbbbbbbb
261+ end
262+ end
0 commit comments