Skip to content

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

@dvyukov

Description

@dvyukov

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions