let f = (~test: option<int>=42) => ()
gives
We've found a bug for you!
/.../fixtures/optional_default_arg_type_mismatch.res:1:29-30
1 │ let f = (~test: option<int>=42) => ()
2 │
This has type: int
But this switch is expected to return: option<int>
All branches in a switch must return the same type.
To fix this, change your branch to return the expected type.
However, there is no switch visible to the user here.
gives
However, there is no
switchvisible to the user here.