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
While looking into #46461, it occurred to me that type-checking the following code will panic:
package p
type T[U interface{ M() T[U, int] }] int
type X T[int]
The reason for this is that, while we get an error for the invalid instantiation T[U, int] while type checking U's constraint, when instantiating T[int] we try to substitute in T[U, int] (at which point we won't have a Checker) (edit: this ended up not being as complicated as initially feared).
Working on a fix. We can perhaps skip substituting *Named types with invalid underlying.
While looking into #46461, it occurred to me that type-checking the following code will panic:
The reason for this is that, while we get an error for the invalid instantiation T[U, int] while type checking U's constraint, when instantiating T[int] we try to substitute in T[U, int]
(at which point we won't have a Checker)(edit: this ended up not being as complicated as initially feared).Working on a fix.
We can perhaps skip substituting *Named types with invalid underlying.CC @griesemer
The text was updated successfully, but these errors were encountered: