JVM_IR KT-47510 indy callee parent is a package fragment, not a class

This commit is contained in:
Dmitry Petrov
2021-06-29 12:17:48 +03:00
committed by TeamCityServer
parent a54e758189
commit 68c3f30aa7
6 changed files with 50 additions and 3 deletions
@@ -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"