Skip to content

Commit 49621c1

Browse files
committed
Fix compilation after KT-76478
1 parent 307d65b commit 49621c1

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

kotlinx-coroutines-core/api/kotlinx-coroutines-core.klib.api

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,23 @@ final value class <#A: out kotlin/Any?> kotlinx.coroutines.channels/ChannelResul
546546
final fun hashCode(): kotlin/Int // kotlinx.coroutines.channels/ChannelResult.hashCode|hashCode(){}[0]
547547
final fun toString(): kotlin/String // kotlinx.coroutines.channels/ChannelResult.toString|toString(){}[0]
548548

549+
final class Closed : kotlinx.coroutines.channels/ChannelResult.Failed { // kotlinx.coroutines.channels/ChannelResult.Closed|null[0]
550+
constructor <init>(kotlin/Throwable?) // kotlinx.coroutines.channels/ChannelResult.Closed.<init>|<init>(kotlin.Throwable?){}[0]
551+
552+
final val cause // kotlinx.coroutines.channels/ChannelResult.Closed.cause|{}cause[0]
553+
final fun <get-cause>(): kotlin/Throwable? // kotlinx.coroutines.channels/ChannelResult.Closed.cause.<get-cause>|<get-cause>(){}[0]
554+
555+
final fun equals(kotlin/Any?): kotlin/Boolean // kotlinx.coroutines.channels/ChannelResult.Closed.equals|equals(kotlin.Any?){}[0]
556+
final fun hashCode(): kotlin/Int // kotlinx.coroutines.channels/ChannelResult.Closed.hashCode|hashCode(){}[0]
557+
final fun toString(): kotlin/String // kotlinx.coroutines.channels/ChannelResult.Closed.toString|toString(){}[0]
558+
}
559+
560+
open class Failed { // kotlinx.coroutines.channels/ChannelResult.Failed|null[0]
561+
constructor <init>() // kotlinx.coroutines.channels/ChannelResult.Failed.<init>|<init>(){}[0]
562+
563+
open fun toString(): kotlin/String // kotlinx.coroutines.channels/ChannelResult.Failed.toString|toString(){}[0]
564+
}
565+
549566
final object Companion { // kotlinx.coroutines.channels/ChannelResult.Companion|null[0]
550567
final fun <#A2: kotlin/Any?> closed(kotlin/Throwable?): kotlinx.coroutines.channels/ChannelResult<#A2> // kotlinx.coroutines.channels/ChannelResult.Companion.closed|closed(kotlin.Throwable?){0§<kotlin.Any?>}[0]
551568
final fun <#A2: kotlin/Any?> failure(): kotlinx.coroutines.channels/ChannelResult<#A2> // kotlinx.coroutines.channels/ChannelResult.Companion.failure|failure(){0§<kotlin.Any?>}[0]

kotlinx-coroutines-core/common/src/channels/Channel.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,10 +939,12 @@ public value class ChannelResult<out T>
939939
*/
940940
public fun exceptionOrNull(): Throwable? = (holder as? Closed)?.cause
941941

942+
@PublishedApi
942943
internal open class Failed {
943944
override fun toString(): String = "Failed"
944945
}
945946

947+
@PublishedApi
946948
internal class Closed(@JvmField val cause: Throwable?): Failed() {
947949
override fun equals(other: Any?): Boolean = other is Closed && cause == other.cause
948950
override fun hashCode(): Int = cause.hashCode()

kotlinx-coroutines-core/jvm/src/internal/ThreadContext.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ internal fun restoreThreadContext(context: CoroutineContext, oldState: Any?) {
9696
@PublishedApi
9797
internal data class ThreadLocalKey(private val threadLocal: ThreadLocal<*>) : CoroutineContext.Key<ThreadLocalElement<*>>
9898

99+
@PublishedApi
99100
internal class ThreadLocalElement<T>(
100101
private val value: T,
101102
private val threadLocal: ThreadLocal<T>

0 commit comments

Comments
 (0)