-
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: confusing error messages when a type is repeated #8853
Comments
@btracey - Can you post the code where you got the interface conversion error before the redeclaration error ? And possibly those "more errors". In my testing, the errors come linearly in the order in which they are written in the source code. If I redeclare before trying to convert the interface, it gives me the redeclaration error before. Vice-versa, it gives the interface conversion error before. This seems like reasonable behavior to me. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Sorry, this bug report is from a long time ago and I don't have any memory of what the code would have been. I believe though that the problem was I had a many compile errors, and so I was only getting the error saying the interface type can't be converted, and the redeclared error. was not printed |
The issue is that the
Is very confusing. It would be better to not print, or print something else, if the strings are identical |
@agnivade We should not be printing
That is not helpful at any level. We should suppress that error for duplicate types, given that the duplicate type is already going to cause an error. |
Ah, thank you for the clarification. I thought the issue was about the order of the errors. |
Is interface conversion the only place where this problem can appear? If so, would it be enough to return |
The text was updated successfully, but these errors were encountered: