Skip to content

Commit 73b2ef0

Browse files
committed
Compiler: fix for OCaml 5.4
1 parent d90f682 commit 73b2ef0

File tree

4 files changed

+398
-3
lines changed

4 files changed

+398
-3
lines changed

compiler/lib/magic_number.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,12 @@ let v =
7373
| 5 :: 01 :: _ -> 33
7474
| 5 :: 02 :: _ -> 34
7575
| 5 :: 03 :: _ -> 35
76+
| 5 :: 04 :: _ -> 36
7677
| _ ->
7778
if Ocaml_version.compare current [ 4; 13 ] < 0
7879
then failwith "OCaml version unsupported. Upgrade to OCaml 4.13 or newer."
7980
else (
80-
assert (Ocaml_version.compare current [ 5; 4 ] >= 0);
81+
assert (Ocaml_version.compare current [ 5; 5 ] >= 0);
8182
failwith "OCaml version unsupported. Upgrade js_of_ocaml.")
8283

8384
let current_exe = "Caml1999X", v

compiler/tests-check-prim/gen_dune.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ type version =
88
| `V5_2
99
| `V5_3
1010
| `V5_4
11+
| `V5_5
1112
]
1213

1314
let string_of_version : version -> string = function
@@ -18,6 +19,7 @@ let string_of_version : version -> string = function
1819
| `V5_2 -> "5.2"
1920
| `V5_3 -> "5.3"
2021
| `V5_4 -> "5.4"
22+
| `V5_5 -> "5.5"
2123

2224
let next_version : version -> version option = function
2325
| `V4_13 -> Some `V4_14
@@ -26,7 +28,8 @@ let next_version : version -> version option = function
2628
| `V5_1 -> Some `V5_2
2729
| `V5_2 -> Some `V5_3
2830
| `V5_3 -> Some `V5_4
29-
| `V5_4 -> None
31+
| `V5_4 -> Some `V5_5
32+
| `V5_5 -> None
3033

3134
type os_type =
3235
| Unix

tools/toplevel_expect/gen.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,6 @@ let () =
5353
assert (min >= 11);
5454
dump_file "toplevel_expect_test.ml-4.11"
5555
| 5, 0 | 5, 1 | 5, 2 -> dump_file "toplevel_expect_test.ml-4.11"
56-
| 5, _ -> dump_file "toplevel_expect_test.ml-5.3"
56+
| 5, 3 -> dump_file "toplevel_expect_test.ml-5.3"
57+
| 5, 4 -> dump_file "toplevel_expect_test.ml-5.4"
5758
| _ -> failwith ("unsupported version " ^ Sys.ocaml_version)

0 commit comments

Comments
 (0)