Closed
Description
v11 uncurried mode:
let (value, setValue) = React.useState(() => None)
// Correct
setValue(_ => Some(42))
// Incorrect
setValue(Some(42))
Error message for the second setValue
:
The constructor Some does not belong to type function$
This variant expression is expected to have type option<int> => option<int>
function$
is an implementation detail of uncurried functions and should not appear in a user-facing error message.
Metadata
Metadata
Assignees
Labels
No labels