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
package p
func f[T any](t T) func(interface{}) bool {
return func(x interface{}) bool {
return x == t
}
}
The type checker produces the error cannot compare x == t (operator == not defined for interface{}), but that's not accurate. The real problem is that T is not comparable.