Last active
April 29, 2024 16:41
-
-
Save Mercandj/72fceed15d5566655efd8b31dc4632c4 to your computer and use it in GitHub Desktop.
medium_article_kotlin_sealed_class_bad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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