Type checking the following code panics in the type checker in substitution:
type N[P any] M[P]
type M[P any] N[P]
The reason is likely that RHS expansion happens too early, in Checker.typeDecl. I believe this can be fixed by delaying expansion, but filing an issue to track this as a release-blocker since it is late in the cycle.
This is a clean port of CL 356533 from go/types to types2.
Trust: Robert Griesemer <firstname.lastname@example.org>
Reviewed-by: Robert Findley <email@example.com>