I believe this would work with type sets:
type Result[T any, E any] interface {
T | E
} type Result[T any, E any] interface {
T | E
}If we want to accept underlying types then we would need ~T | ~E.
Either way this doesn't help since typesets cannot be used as normal interfaces, only generic constraints.