Do you have an example of how it can be used with ...
# getting-started
l
Do you have an example of how it can be used with generics? @diesieben07
d
Copy code
sealed class Response<out T> {
    class Success(val value: T): Respose<T>
    object Failure : Response<Nothing>
}
Failure
can now be assigned to any
Response<T>
, since
Nothing
is a subtype of everything.
👍 2
(Replied to the wrong thread at first 🙈 )