Kotlin has null safety, and there are plenty of ways to turn jvm into a binary
enum Foo {
A(String),
B(i32),
}
And it's.. not simple. And even if you manage to do it, it'll never be how Kotlin was meant to be written. sealed interface Foo
class A(val s: String): Foo
class B(val b: Int): Foo