Skip to content

Commit 3608fc0

Browse files
committed
Fix compilation after KT-76478
1 parent 307d65b commit 3608fc0

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,12 +742,25 @@ public final class kotlinx/coroutines/channels/ChannelResult {
742742
public final synthetic fun unbox-impl ()Ljava/lang/Object;
743743
}
744744

745+
public final class kotlinx/coroutines/channels/ChannelResult$Closed : kotlinx/coroutines/channels/ChannelResult$Failed {
746+
public final field cause Ljava/lang/Throwable;
747+
public fun <init> (Ljava/lang/Throwable;)V
748+
public fun equals (Ljava/lang/Object;)Z
749+
public fun hashCode ()I
750+
public fun toString ()Ljava/lang/String;
751+
}
752+
745753
public final class kotlinx/coroutines/channels/ChannelResult$Companion {
746754
public final fun closed-JP2dKIU (Ljava/lang/Throwable;)Ljava/lang/Object;
747755
public final fun failure-PtdJZtk ()Ljava/lang/Object;
748756
public final fun success-JP2dKIU (Ljava/lang/Object;)Ljava/lang/Object;
749757
}
750758

759+
public class kotlinx/coroutines/channels/ChannelResult$Failed {
760+
public fun <init> ()V
761+
public fun toString ()Ljava/lang/String;
762+
}
763+
751764
public final class kotlinx/coroutines/channels/ChannelsKt {
752765
public static final synthetic fun any (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
753766
public static final fun cancelConsumed (Lkotlinx/coroutines/channels/ReceiveChannel;Ljava/lang/Throwable;)V

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 // necessary because it's exposed in public inline functions.
942943
internal open class Failed {
943944
override fun toString(): String = "Failed"
944945
}
945946

947+
@PublishedApi // necessary because it's exposed in public inline functions.
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)