rescript-compiler
rescript-compiler copied to clipboard
@this is breaking in rescript v11
Seems to only happen in uncurried mode. cc @cristianoc
It seems like wrapping the @this {fn definition}
inside of {}
is causing issues. We were able to fix it by changing from {}
to ()
Came here to report an issue with @this
as well.
type t
@send
external on: (
t,
@string
[
| #a(t => unit)
| #b(@this (t => unit)) // ← spot ()
],
) => t = "on"
// format
// ↓ ↓ ↓
type t
@send
external on: (
t,
@string
[
| #a(t => unit)
| #b(@this t => unit) // ← () dropped
],
) => t = "on"