'Stable class with unstable property

After enabling compose metrics & reports I noticed that one of my classes is marked as stable with one of its properties as unstable:

stable class Content {
  unstable val aaa: List<AAA>
  stable val someString: String
}

the class itself is marked as immutable:

@Immutable
data class Content(
    val aaa: List<AAA> = emptyList(),
    val someString: String = "",
)

which I assumed would mark all of the properties as stable o.O

As for the AAA class itself is referenced from a different grade module with enabled KMP under the commonMain source set:

data class Price(
    val p: P,
    val d: String,
    val u: String,
)

enum class P {
    F, S, T,
}

My questions are:

  1. Why @immutable would not mark this whole class as stable?
  2. Does KMP somehow interfere with the compose compiler?
  3. Are there any options for me to help the compiler?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source