JVM_IR: basic suspend conversion on argument test passed

This commit is contained in:
Dmitry Petrov
2020-04-29 10:42:04 +03:00
parent 819634c4cd
commit d9fd51c608
9 changed files with 145 additions and 4 deletions
@@ -0,0 +1,26 @@
// !LANGUAGE: +SuspendConversion
// WITH_RUNTIME
// WITH_COROUTINES
// IGNORE_BACKEND: JVM, NATIVE
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_LIGHT_ANALYSIS
import helpers.*
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation)
}
suspend fun runS(fn: suspend (String) -> String) = fn("O")
val lambda: (String) -> String = { it + "K" }
fun box(): String {
var test = "Failed"
builder {
test = runS(lambda)
}
return test
}