does marking `sealed class` with `@Immutable` has ...
# compose
m
does marking
sealed class
with
@Immutable
has any effect on subclasses?
1
c
It affects the inferred stability annotation of the descendants if the type is compiled with the compose plugin enabled. However, the plugin (after inference) only considers the attributes on the class itself. That is, if the type is in the same module as the compose code then the ancestor is assumed to be stable without looking further. If, however, it is different module YMMV.
d
by the way, it would be nice if all these heuristics were described somewhere for cases when one needs to fully understand how this works to make some decision :)
3