Am I correct that the Compose compiler cannot infe...
# compose
o
Am I correct that the Compose compiler cannot infer a
sealed interface
as stable, even if all of its implementations are inferred as stable? 🧵
For example in this case:
Copy code
sealed interface StringModel {
    data class Res(@StringRes val resId: Int): StringModel
    data class Str(val value: String): StringModel
}
Both
StringModel.Res
and
StringModel.Str
are stable, but when
StringModel
is used in some class it is marked as
<runtime stability> = Uncertain(StringModel)
However when I change it to the `sealed class`:
Copy code
sealed class StringModel {
    data class Res(@StringRes val resId: Int): StringModel()
    data class Str(val value: String): StringModel()
}
Everything is stable as expected 🤔