Join Slack
Powered by
If a sealed class is marked as `Immutable` are all...
# compose
e
eygraber
02/24/2021, 9:23 AM
If a sealed class is marked as
Immutable
are all of its subclasses considered
Immutable
as well?
👀 1
j
jim
02/24/2021, 10:43 AM
I think not. Sealed or not, the fact a super class is
Immutable
tells you nothing about the contract for the subclasses.
jim
02/24/2021, 10:44 AM
Therefore, you would need to mark each class individually.
🙏 1
e
eygraber
11/24/2021, 5:11 PM
@jim
is this still the case? In
https://kotlinlang.slack.com/archives/CJLTWPH7S/p1637743593403000?thread_ts=1637743593.403000&cid=CJLTWPH7S
@Csaba Kozák
pointed out that the compiler seems to be marking classes as stable if they have a supertype that is stable.
3
Views
Open in Slack
Previous
Next