https://kotlinlang.org logo
e

elizarov

03/06/2017, 4:56 AM
You really need support for union types to type-check this kind of code. Look at how many things inside
kotlinx.coroutines
are implemented, for example. It has more complex unions than just
UNINITIALIZED_VALUE | T
union that is used in`lazy`.