commit | d4fabbfa287d77294b69d80a2a29654ad3960e0a | [log] [tgz] |
---|---|---|
author | Roman Elizarov <elizarov@gmail.com> | Tue Mar 03 10:26:31 2020 +0300 |
committer | Roman Elizarov <elizarov@gmail.com> | Tue Mar 03 10:29:18 2020 +0300 |
tree | c7274369bfc672b8f7d34fa23a4273ef5a6c14b1 | |
parent | 21bb6fb201b12e26d6763519b46881f89914d6fc [diff] |
Fixed regularized 'when' inference to build train See https://youtrack.jetbrains.com/issue/KT-36776
diff --git a/kotlinx-coroutines-core/common/src/channels/ConflatedBroadcastChannel.kt b/kotlinx-coroutines-core/common/src/channels/ConflatedBroadcastChannel.kt index 5813902..4990c93 100644 --- a/kotlinx-coroutines-core/common/src/channels/ConflatedBroadcastChannel.kt +++ b/kotlinx-coroutines-core/common/src/channels/ConflatedBroadcastChannel.kt
@@ -91,7 +91,7 @@ */ public val valueOrNull: E? get() = when (val state = _state.value) { is Closed -> null - is State<*> -> UNDEFINED.unbox(state.value) + is State<*> -> UNDEFINED.unbox<E?>(state.value) else -> error("Invalid state $state") }