8d25c20169
Sealed classes can be derived only by their own inner classes or objects. Their constructors cannot be called explicitly, so compiler knows all their descendants. Incompatible modifier checks (final, abstract). Impossible with interface, object, enum. A pack of tests provided.
3 lines
65 B
Kotlin
Vendored
3 lines
65 B
Kotlin
Vendored
<!ABSTRACT_MODIFIER_IN_SEALED!>abstract<!> sealed class Base {
|
|
|
|
} |