<How do I write Nested Generics in Kotlin's Sealed...
# stackoverflow
u
How do I write Nested Generics in Kotlin's Sealed Classes I'm trying to come up with a data model that allows me to do the following: Define a type of Task and change its Status This Status can be either InProgress or Completed In the case of a completed Status, I want to be able to add data, that is specific to the Task that was completed. Initially, I came up with this data model: sealed class Task { abstract val status: TaskStatus data class A( val data: String, override val status: TaskStatus, ) : Task()...