We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b16e1b commit 68360e0Copy full SHA for 68360e0
kotlinx-coroutines-core/native/src/Builders.kt
@@ -73,7 +73,7 @@ private class BlockingCoroutine<T>(
73
eventLoop?.decrementUseCount()
74
}
75
// now return result
76
- val state = state
+ val state = state.unboxState()
77
(state as? CompletedExceptionally)?.let { throw it.cause }
78
state as T
79
kotlinx-coroutines-core/native/test/RunBlockingTest.kt
@@ -0,0 +1,18 @@
1
+/*
2
+ * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
+ */
4
+
5
+package kotlinx.coroutines
6
+import kotlin.test.*
7
8
+class RunBlockingTest : TestBase() {
9
10
+ @Test
11
+ fun testIncompleteState() {
12
+ val handle = runBlocking {
13
+ coroutineContext[Job]!!.invokeOnCompletion { }
14
+ }
15
16
+ handle.dispose()
17
18
+}
0 commit comments