Skip to content

Commit 5a74c75

Browse files
committed
Hide ConflatedBroadcastChannel private companion fields from public ABI
Unfortunately, Companion object reference remains public, even though it exposes a private companion object type, see https://youtrack.jetbrains.com/issue/KT-11567
1 parent 4220ca2 commit 5a74c75

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

binary-compatibility-validator/reference-public-api/kotlinx-coroutines-core.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,10 +563,7 @@ public final class kotlinx/coroutines/channels/ClosedSendChannelException : java
563563
}
564564

565565
public final class kotlinx/coroutines/channels/ConflatedBroadcastChannel : kotlinx/coroutines/channels/BroadcastChannel {
566-
public static final field CLOSED Lkotlinx/coroutines/channels/ConflatedBroadcastChannel$Closed;
567566
public static final field Companion Lkotlinx/coroutines/channels/ConflatedBroadcastChannel$Companion;
568-
public static final field INITIAL_STATE Lkotlinx/coroutines/channels/ConflatedBroadcastChannel$State;
569-
public static final field UNDEFINED Lkotlinx/coroutines/internal/Symbol;
570567
public fun <init> ()V
571568
public fun <init> (Ljava/lang/Object;)V
572569
public fun cancel (Ljava/lang/Throwable;)Z

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,9 @@ public class ConflatedBroadcastChannel<E>() : BroadcastChannel<E> {
4545
private val onCloseHandler = atomic<Any?>(null)
4646

4747
private companion object {
48-
@JvmField
49-
val CLOSED = Closed(null)
50-
51-
@JvmField
52-
val UNDEFINED = Symbol("UNDEFINED")
53-
54-
@JvmField
55-
val INITIAL_STATE = State<Any?>(UNDEFINED, null)
48+
private val CLOSED = Closed(null)
49+
private val UNDEFINED = Symbol("UNDEFINED")
50+
private val INITIAL_STATE = State<Any?>(UNDEFINED, null)
5651
}
5752

5853
private class State<E>(

0 commit comments

Comments
 (0)