Kotlin doesn't have a notion of union types, so I ...
# announcements
j
Kotlin doesn't have a notion of union types, so I imagine it would either smart cast it to the nearest superclass (probably
Entity
), or not cast it at all.
b
Copy code
sealed class Foo
data class Case1(...) extends Foo
data class Case2(...) extends Foo
just like in Scala. Arrow-KT's Either is implemented similarly