-
Notifications
You must be signed in to change notification settings - Fork 833
Description
What
An idea for the #1103 list. If you attempt to use an operator that you haven't defined (possibly because you've forgotten an "open" like in this StackOverflow example or in some code I just wrote myself) you can receive an error message like:
Expecting a type supporting the operator '>=>' but given a function type. You may be missing an argument to a function.
Why
Importing the operator could be a quick fix depending on the circumstances, but the error message does not point in that direction.
Currently the error suggests only looking closely at the types involved and checking for missing arguments. It is possible to follow both of those suggestions and still be unaware you've missed importing the operator.
How
The existing message isn't incorrect, so perhaps a new suggestion could be appended to it:
Expecting a type supporting the operator '>=>' but given a function type. You may be missing an argument to a function, or the operator you are trying to use may not be defined in the current scope.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status