-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/compile: possible error message improvement #4565
Comments
I agree that it's a bit of a leap.
Compare that to the error when only variables are in the expression. It includes the expression and the types of the variables in question: https://play.golang.org/p/nfZ_xMultw
I like the idea of including (x) in the error message.
On the other hand, it's not always clear which variables are the cause when only variables are involved: https://play.golang.org/p/9_EchugdkA
So maybe there's a better way to do that error message as well. What comes to mind is the conversion syntax to indicate the types:
Here's a slightly more complex constants example where it might be nice if the error indicated that
https://play.golang.org/p/wklLBzn6XY This is my random issue today via CodeTriage. |
I suppose this is better now:
|
The text was updated successfully, but these errors were encountered: