Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
Opportunistic fix toStrings
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Jun 22, 2023
1 parent 4fd16ac commit a924c11
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/main/kotlin/slack/cli/exec/RetrySignal.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,25 @@ import kotlin.time.Duration
internal sealed interface RetrySignal {

/** Unknown issue. */
@TypeLabel("unknown") object Unknown : RetrySignal
@TypeLabel("unknown")
object Unknown : RetrySignal {
// TODO remove when we have data objects in Kotlin 1.9
override fun toString() = this::class.simpleName!!
}

/** Indicates an issue that is recognized but cannot be retried. */
@TypeLabel("ack") object Ack : RetrySignal
@TypeLabel("ack")
object Ack : RetrySignal {
// TODO remove when we have data objects in Kotlin 1.9
override fun toString() = this::class.simpleName!!
}

/** Indicates this issue should be retried immediately. */
@TypeLabel("immediate") object RetryImmediately : RetrySignal
@TypeLabel("immediate")
object RetryImmediately : RetrySignal {
// TODO remove when we have data objects in Kotlin 1.9
override fun toString() = this::class.simpleName!!
}

/** Indicates this issue should be retried after a [delay]. */
@TypeLabel("delayed")
Expand Down

0 comments on commit a924c11

Please sign in to comment.