In general it's just a design decision, rather than a technical limitation
l
Loney Chou
10/26/2022, 12:09 AM
For data class I can compromise, but sealed class I don't think it's convincing. My use case suggests me to use exhaustive when while each subclass holding a reference of the outer class because I need the generic type. For now I need to re-declare that generic type, and you can see it's treated differently on this aspect between abstract and sealed.