JVM_IR KT-50277 skip temporary var elimination on inline suspend lambda
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// WITH_STDLIB
|
||||
// WITH_COROUTINES
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun g(): Int = 42
|
||||
|
||||
suspend fun f(block: suspend (a: Int) -> Unit) {
|
||||
listOf(0).map { block(g()) }
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = "Failed"
|
||||
builder {
|
||||
f { result = "OK" }
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user