Skip to content

Instantly share code, notes, and snippets.

@Mercandj
Last active April 29, 2024 16:41
Show Gist options
  • Save Mercandj/72fceed15d5566655efd8b31dc4632c4 to your computer and use it in GitHub Desktop.
Save Mercandj/72fceed15d5566655efd8b31dc4632c4 to your computer and use it in GitHub Desktop.
medium_article_kotlin_sealed_class_bad
sealed interface Response {
val httpCode: Int
}
data class Success(
override val httpCode: Int,
val data: String
) : Response
data class Fail(
override val httpCode: Int
) : Response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment