Is this for compatibility with Java?, the same can...
# language-proposals
r
Is this for compatibility with Java?, the same can already be expressed with ADTs in Kotlin:
Copy code
sealed class MyLongClassNameActivityMode
object WaitingInput : MyLongClassNameActivityMode()
object Loading : MyLongClassNameActivityMode()
object Complete : MyLongClassNameActivityMode()

fun changeUiMode(mode: MyLongClassNameActivityMode) = when (mode) {
  is WaitingInput -> TODO()
  is Loading -> TODO()
  is Complete -> TODO()
}