Open
Description
let f: (~foo: int=?) => unit = (~foo) => ()
This yields the error:
This function should have type (~foo: int=?) => unit
but its first argument is labelled ~foo
Seeing as the argument is labeled ~foo
in both signature and implementation, the error message is a bit misleading. It should say that it should be optional.
Additionally, the error for the converse is this:
This function should have type (~foo: int) => unit
but its first argument is labelled ?foo
which reveals OCaml syntax.