You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: