Would union types in Kotlin, instead of overloads be possible in the future?
n
Nir
12/25/2020, 4:38 PM
You can emulate this with sealed classes, but this doesn't work well because you'd have to intrusively add inheritance to the types in question
Nir
12/25/2020, 4:39 PM
There's a proposal to allow for interface inheritance to be added non intrusively, once that's available it would be possible to emulate this in a rather verbose but decent way