in the union type case you need to cast to the rig...
# language-proposals
e
in the union type case you need to cast to the right type, only Kotlin could do it for you