JVM_IR. Do not unbox Result in inline lambda
Since JVM_IR generates inline lambdas differently from old backend, in this case, it generates them as normal functions. Thus, there is no need to unbox the lambda argument. #KT-44671 Fixed
This commit is contained in:
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
fun myRun(c: () -> Unit) {
|
||||
c()
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
fun box(): String {
|
||||
var contiuation: Continuation<Unit>? = null
|
||||
val c: suspend () -> Unit = {
|
||||
suspendCoroutine {
|
||||
contiuation = it
|
||||
}
|
||||
}
|
||||
|
||||
var exception: Throwable? = null
|
||||
myRun {
|
||||
c.startCoroutineUninterceptedOrReturn(Continuation(EmptyCoroutineContext) {
|
||||
exception = it.exceptionOrNull()
|
||||
})
|
||||
}
|
||||
|
||||
contiuation?.resumeWithException(RuntimeException("OK"))
|
||||
|
||||
return exception!!.message!!
|
||||
}
|
||||
Reference in New Issue
Block a user