Skip to content

Conversation

mseri
Copy link
Member

@mseri mseri commented Jul 10, 2025

Fails with

 -let (_ : string of_js) = Ojs.string_of_js
 -let (_ : string to_js) = Ojs.string_to_js
 -let (_ : int of_js) = Ojs.int_of_js
 -let (_ : int to_js) = Ojs.int_to_js
 -let (_ : bool of_js) = Ojs.bool_of_js
 -let (_ : bool to_js) = Ojs.bool_to_js
 -let (_ : float of_js) = Ojs.float_of_js
 -let (_ : float to_js) = Ojs.float_to_js
 -let (_ : Ojs.t of_js) = fun (x9 : Ojs.t) -> x9
 -let (_ : Ojs.t to_js) = fun (x10 : Ojs.t) -> x10
 -let (_ : (string * int) of_js) =
 +let _ = Ojs.string_of_js
 +let _ = Ojs.string_to_js
 +let _ = Ojs.int_of_js
 +let _ = Ojs.int_to_js
 +let _ = Ojs.bool_of_js
 +let _ = Ojs.bool_to_js
 +let _ = Ojs.float_of_js
 +let _ = Ojs.float_to_js
 +let _ = fun (x9 : Ojs.t) -> x9
 +let _ = fun (x10 : Ojs.t) -> x10
 +let _ =
    fun (x11 : Ojs.t) ->
      let x12 = x11 in
      ((Ojs.string_of_js (Ojs.array_get x12 0)),
        (Ojs.int_of_js (Ojs.array_get x12 1)))
 -let (_ : (string * int) to_js) =
 +let _ =
    fun (x13 : (string * int)) ->
      let (x14, x15) = x13 in
      let x16 = Ojs.array_make 2 in
      Ojs.array_set x16 0 (Ojs.string_to_js x14);
      Ojs.array_set x16 1 (Ojs.int_to_js x15);
      x16

Fails with
```
 -let (_ : string of_js) = Ojs.string_of_js
 -let (_ : string to_js) = Ojs.string_to_js
 -let (_ : int of_js) = Ojs.int_of_js
 -let (_ : int to_js) = Ojs.int_to_js
 -let (_ : bool of_js) = Ojs.bool_of_js
 -let (_ : bool to_js) = Ojs.bool_to_js
 -let (_ : float of_js) = Ojs.float_of_js
 -let (_ : float to_js) = Ojs.float_to_js
 -let (_ : Ojs.t of_js) = fun (x9 : Ojs.t) -> x9
 -let (_ : Ojs.t to_js) = fun (x10 : Ojs.t) -> x10
 -let (_ : (string * int) of_js) =
 +let _ = Ojs.string_of_js
 +let _ = Ojs.string_to_js
 +let _ = Ojs.int_of_js
 +let _ = Ojs.int_to_js
 +let _ = Ojs.bool_of_js
 +let _ = Ojs.bool_to_js
 +let _ = Ojs.float_of_js
 +let _ = Ojs.float_to_js
 +let _ = fun (x9 : Ojs.t) -> x9
 +let _ = fun (x10 : Ojs.t) -> x10
 +let _ =
    fun (x11 : Ojs.t) ->
      let x12 = x11 in
      ((Ojs.string_of_js (Ojs.array_get x12 0)),
        (Ojs.int_of_js (Ojs.array_get x12 1)))
 -let (_ : (string * int) to_js) =
 +let _ =
    fun (x13 : (string * int)) ->
      let (x14, x15) = x13 in
      let x16 = Ojs.array_make 2 in
      Ojs.array_set x16 0 (Ojs.string_to_js x14);
      Ojs.array_set x16 1 (Ojs.int_to_js x15);
      x16
```

Signed-off-by: Marcello Seri <[email protected]>
@mseri
Copy link
Member Author

mseri commented Jul 10, 2025

Seen on #28144

@raphael-proust
Copy link
Contributor

Thanks!

@raphael-proust raphael-proust merged commit ce03608 into ocaml:master Jul 17, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants