Kotlin, Android, Software Development, Kotlin Multiplatform, Java.
ServerError(val message: String) : LoadingError(500) } // IDE offers to prefill all the possible values // compiler warns us if we don't check all values or add else branch when (screenState) { is Success -> TODO() is Error -> { println(screenState.exception.errorCode) when(screenState.exception){