-
Notifications
You must be signed in to change notification settings - Fork 18k
go/types: "duplicate case in expression switch" error could be formatted better (perhaps) #26357
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
Comments
Forgot to mention - the compiler gets this right, as expected:
|
Sorry, I don't understand what you are after here. The go/types error does say "previous case" at |
Oh, the position is at the left. I completely missed that, even after reading the error multiple times. Maybe that's just me, or maybe the error could be made clearer. I definitely find the compiler's version easier to understand. |
The advantage of putting the position at the left is that it works well with tools, such as editors, which can cycle through the locations. Maybe we can improve the "previous case" text to make that clearer. |
What @ianlancetaylor said. |
Current error message is
So the 2nd line has been clarified, but the position is no longer of the left. |
I think this ok as is. The 2nd line is really just clarifying the error, it's not another error. Closing as working as intended. |
Haven't digged into why this error appears to be broken.
/cc @griesemer
The text was updated successfully, but these errors were encountered: