Skip to content

cmd/go2go: improve error messages when types don't satisfy constraints #41125

Closed
@urandom

Description

@urandom

The following program fails to compile: https://go2goplay.golang.org/p/-2Qmhtax9VX
The following error is observed:
prog.go2:238:9: *mapIt(string, int, reverse(string, ReverseIterator(string))) does not satisfy Iterator(T) (missing method Next)

Note that on line 224, the same parametric type is being instantiated, and used in 228 without a problem. Also note line 238, invoking the method the type checker complains about.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions