Skip to content

Commit

Permalink
Add out variance to ApiResult.Failure generic type (#81)
Browse files Browse the repository at this point in the history
* Add out variance to ApiResult.Failure generic type

* Update API
  • Loading branch information
serge-slack authored Sep 23, 2024
1 parent 671a5eb commit 290aae1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eithernet/api/eithernet.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ sealed interface <#A: out kotlin/Any, #B: out kotlin/Any> com.slack.eithernet/Ap
final fun networkFailure(okio/IOException): com.slack.eithernet/ApiResult.Failure.NetworkFailure // com.slack.eithernet/ApiResult.Companion.networkFailure|networkFailure(okio.IOException){}[0]
final fun unknownFailure(kotlin/Throwable): com.slack.eithernet/ApiResult.Failure.UnknownFailure // com.slack.eithernet/ApiResult.Companion.unknownFailure|unknownFailure(kotlin.Throwable){}[0]
}
sealed interface <#A1: kotlin/Any> Failure : com.slack.eithernet/ApiResult<kotlin/Nothing, #A1> { // com.slack.eithernet/ApiResult.Failure|null[0]
sealed interface <#A1: out kotlin/Any> Failure : com.slack.eithernet/ApiResult<kotlin/Nothing, #A1> { // com.slack.eithernet/ApiResult.Failure|null[0]
final class <#A2: kotlin/Any> ApiFailure : com.slack.eithernet/ApiResult.Failure<#A2> { // com.slack.eithernet/ApiResult.Failure.ApiFailure|null[0]
final fun withTags(kotlin.collections/Map<kotlin.reflect/KClass<*>, kotlin/Any>): com.slack.eithernet/ApiResult.Failure.ApiFailure<#A2> // com.slack.eithernet/ApiResult.Failure.ApiFailure.withTags|withTags(kotlin.collections.Map<kotlin.reflect.KClass<*>,kotlin.Any>){}[0]
final val error // com.slack.eithernet/ApiResult.Failure.ApiFailure.error|{}error[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public sealed interface ApiResult<out T : Any, out E : Any> {
}

/** Represents a failure of some sort. */
public sealed interface Failure<E : Any> : ApiResult<Nothing, E> {
public sealed interface Failure<out E : Any> : ApiResult<Nothing, E> {

/**
* A network failure caused by a given [error]. This error is opaque, as the actual type could
Expand Down

0 comments on commit 290aae1

Please sign in to comment.