Skip to content
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: better diagnostics of wrong type in type switch #10561

Closed
dvyukov opened this issue Apr 23, 2015 · 1 comment
Closed

cmd/compile: better diagnostics of wrong type in type switch #10561

dvyukov opened this issue Apr 23, 2015 · 1 comment
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Apr 23, 2015

The program is:
http://play.golang.org/p/7lZfmkosub

When I assign X to I, compiler nicely says "X does not implement I (Foo method has pointer receiver)". However, in type switch it says just "i (type I) cannot have dynamic type X (missing Foo method)" for the same error. It would be nice to say "(Foo method has pointer receiver)" in type switch as well.

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Jun 3, 2015
@ianlancetaylor ianlancetaylor changed the title cmd/gc: better diagnostics of wrong type in type switch cmd/compile: better diagnostics of wrong type in type switch Jun 3, 2015
@gopherbot
Copy link

CL https://golang.org/cl/35235 mentions this issue.

@odeke-em odeke-em self-assigned this Feb 2, 2017
@odeke-em odeke-em modified the milestones: Go1.9, Unplanned Feb 2, 2017
@golang golang locked and limited conversation to collaborators Feb 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants