Skip to content

Commit d4fabbf

Browse files
committed
Fixed regularized 'when' inference to build train
See https://youtrack.jetbrains.com/issue/KT-36776
1 parent 21bb6fb commit d4fabbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public class ConflatedBroadcastChannel<E>() : BroadcastChannel<E> {
9191
*/
9292
public val valueOrNull: E? get() = when (val state = _state.value) {
9393
is Closed -> null
94-
is State<*> -> UNDEFINED.unbox(state.value)
94+
is State<*> -> UNDEFINED.unbox<E?>(state.value)
9595
else -> error("Invalid state $state")
9696
}
9797

0 commit comments

Comments
 (0)