JVM_IR KT-47510 indy callee parent is a package fragment, not a class
This commit is contained in:
committed by
TeamCityServer
parent
a54e758189
commit
68c3f30aa7
@@ -0,0 +1,19 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.concurrent.Executor
|
||||
import kotlin.coroutines.Continuation
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
class Wrapper<T>(val pool: Executor, private val cont: Continuation<T>) : Continuation<T> {
|
||||
override val context: CoroutineContext
|
||||
get() = cont.context
|
||||
|
||||
override fun resumeWith(result: Result<T>) {
|
||||
// Check that there's no compiler exception here
|
||||
pool.execute { cont.resumeWith(result) }
|
||||
}
|
||||
}
|
||||
|
||||
fun box() = "OK"
|
||||
Reference in New Issue
Block a user