Skip to content

Commit 0a92618

Browse files
committed
Fix build before 4.12
1 parent 6b27984 commit 0a92618

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/lib/ocaml_compiler.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ let rec constant_of_const ~target c : Code.constant =
4242
Int
4343
(match target with
4444
| `JavaScript -> Int32.of_int_warning_on_overflow i
45-
| `Wasm -> Int31.of_int_warning_on_overflow i)
45+
| `Wasm -> Int31.(of_int_warning_on_overflow i |> to_int32))
4646
| Const_block (tag, l) ->
4747
let l = Array.of_list (List.map l ~f:(fun c -> constant_of_const ~target c)) in
4848
Tuple (tag, l, Unknown)

0 commit comments

Comments
 (0)