rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

Misleading error message for not adding `=?` for the function labeled argument

Open DZakh opened this issue 1 year ago • 2 comments

image

The error says:

This function should have type
  (
~estimatedRetailPrice: Money.t=?,
~mileage: Vehicle.Mileage.t,
) => (~onSuccess: unit => unit, ~onFailure: string => unit) => unit
but its first argument is labelled ~estimatedRetailPrice

But what it actually wants is for me to add =? after ~estimatedRetailPrice as _.

DZakh avatar Mar 22 '24 08:03 DZakh

Let me know if you're interested in taking a stab at it, we could throw some ideas around on how to make it better and where the actual code is located?

zth avatar Mar 22 '24 15:03 zth

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Mar 18 '25 02:03 github-actions[bot]