Does Kotlin support upper and lower type constraints in setting covariance. For example, I want to say
class Foo<out T> { fun or<U of T or greater>(other: U): <U> = ... }
which in Scala would be
class Foo[+T] { def or[U >: T](other: U): U = ... }
But the compiler does not seem to like this, he complains about the covariance of a parameter of type T.
source share