Allow passing more concrete types for any

If you’re using generics you could create a generic type more restrictive than any. For example,

func Wrap[T Foo | Bar](fn func() (T, error)) func() string {
...
}
1 Like