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
type A[T any] struct{}
func (*A[T]) f(T) {}
type B[T any] struct{ A[T] }
func main() {
var b B[string]
b.A.f("") // ok
b.f("") // compile error: type *B[string] of b does not match *A[K] (cannot infer T)
}
causes go2go to emit this spurious-looking error:
prog.go2:12:2: type *B[string] of b does not match *A[T] (cannot infer T)