-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error reporting: Member implementation with tuple argument(s) #1203
Comments
erm.. oups |
WIP PR in #1229 |
related PR: #1230 |
I'm leaving feedback about the error message here rather than in the PR so that code can be what's discussed there. I like your initial changes @forki. I've bolded my suggestions. Before:
After:
My rationale for these suggestions:
Thoughts? |
Just some naive thoughts.
|
@cartermp mentioning the given amount would be incredibly useful. And also printing the given signature would help with understanding what's wrong with the given implementation (as I proposed initially):
@vilinski I believe this would require special case checking. But if you start adding them to some messages people might start to complain about all the other missing special cases. It's going to be a never ending story. (Though I don't know if they started similar stuff on other messages.) IMHO the compiler should print only enough information to be able to clearly understand what the problem is. Your drawn conclusion may greatly differ depending on what you trying to do. |
Related to #1200
What
There is a difference between
int32 * int32 -> unit
and(int32 * int32) -> unit
. The first one generates 2 parameters and the second one generates 1 tuple parameter. One might stumble upon this error:Why
The error message is confusing, because one might not expect the brackets to change the overall function signature and assume to the result as with:
How
Trying to address @forki proposals ( #1200 (comment) ):
E.g.:
I am unsure about the "tuples vs C# style parameters" explanation (also a native speaker should choose the exact wording :) )
The text was updated successfully, but these errors were encountered: