Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go2go: constraints on type arguments appear to be ignored when validating other constraint arguments on functions #39733
What version of Go are you using (
It's a phase-ordering issue. We know that we have several of those and fixing them will require a fairly substantial rewrite of the core of the type checker which we didn't attempt yet since this is a prototype.
(Both go/types, but also the compiler, have some of these phase-ordering issues with type-checking, due to the "eager" approach of type-checking. For regular Go, these issues mostly appear for corner-case scenarios. Unfortunately, with generics, correct phase-ordering has become paramount.)