This repository was archived by the owner on Jun 15, 2023. It is now read-only.
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
Error message for optional arguments is incorrect. #459
Closed
Description
module M: {
let f: (~a: int) => int
} = {
let f = (~a=1) => 1
}
Error message:
Signature mismatch:
...
Values do not match:
let f: (~?a: int) => int
is not included in
let f: (~a: int) => int
If the user tries to use the syntax in the message, let f: (~?a: int) => int
, then it does not fix the error. To make it weirder, it seems like the parser just ignores the ?
in ~?a
and reports it as if it was written ~a
.
Edit: here's a possibly related issue:
the
rescript dump
command for the implementation will output the interface without “=?” part, and it will not compile.
Metadata
Metadata
Assignees
Labels
No labels