JVM_IR: basic suspend conversion on argument test passed
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user