In ReScript 13.0.0-alpha.3, this does not compile correctly anymore:
module type Test = {
@react.component
let make: (~test: int=?) => React.element
}
module A: Test = {
@react.component
let make = (~test: option<int>=42) => {
React.null
}
}
It gives the error message:
This has type: int
But it's expected to have type: option<int>
In earlier ReScript versions, it compiled fine.
(The real-world code where I extracted this simplified example from had a .res and a .resi, but for easier testing in the playground I used module type / module to be able to test with a single file.)
In ReScript 13.0.0-alpha.3, this does not compile correctly anymore:
It gives the error message:
In earlier ReScript versions, it compiled fine.
(The real-world code where I extracted this simplified example from had a .res and a .resi, but for easier testing in the playground I used module type / module to be able to test with a single file.)