is there a way to “extend” sealaed classes, but ke...
# announcements
d
is there a way to “extend” sealaed classes, but keep the original possibilities? for example, i’d like to create a sealed class around my exceptions. i have a basic set of exceptions throughout the app and specific exceptions for an API, and would like to merge those sealed classes.
Copy code
sealed class BaseException: Throwable() {
	class ErrorOne: BaseException()
}
sealed class SpecificExceptions: BaseException() {
	class ErrorTwo: SpecificExceptions()
}
And in a
when
have branches for both
ErrorOne
and
ErrorTwo
added