Generic Constraints: Lower Bound

Is this kind of problem could be solved with union type ?

abstract fun or(other: Optional<U>): Optional<T|U>
1 Like