Код: Выделить всё
sealed class StateA {
data class State1(val s: String)
object State2
object State3
}
Код: Выделить всё
sealed class StateB {
data class State1(val s: String)
object State2
object State4
}
< /code>
data class State1Код: Выделить всё
sealed class SuperState {
data class State1(val s: String)
object State2
}
sealed class StateA: SuperState() {
object State3
}
sealed class StateB: SuperState() {
object State4
}
< /code>
Unfortunately, this doesn't work and I can't access for example StateA.State1есть решение для этого?
Подробнее здесь: https://stackoverflow.com/questions/749 ... nheritance
Мобильная версия