-
Notifications
You must be signed in to change notification settings - Fork 17.4k
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
go/types: spurious imported and not used #67962
Labels
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Comments
Similar Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
Change https://go.dev/cl/592555 mentions this issue: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This bug is shared between go/types and types2 and therefore between the compiler and gopls.
The problem (I assume) is that the switch is operating on a value e of unknown type, so the cases are not type-checked at all. The use of fmt is not seen, leading to the incorrect imported and not used error.
I feel like we've had other bugs related to not checking inside switch cases in this situation before.
/cc @griesemer @rfindley
The text was updated successfully, but these errors were encountered: