Minor, improve test on suspend invoke function reference

Add WITH_RUNTIME to enable it for the old backend, check the generated
function reference methods by starting the coroutine.
This commit is contained in:
Alexander Udalov
2020-09-25 14:44:21 +02:00
parent 20a5c44e41
commit f8f2be3d9f
@@ -1,11 +1,19 @@
// IGNORE_BACKEND: JVM // WITH_RUNTIME
// WITH_COROUTINES
// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND_FIR: JVM_IR
fun f(a: suspend () -> Unit): String { import kotlin.coroutines.*
import helpers.*
fun f(a: suspend () -> Unit) {
val f = a::invoke val f = a::invoke
return "OK" f.startCoroutine(EmptyContinuation())
} }
fun box(): String { fun box(): String {
return f {} var result = ""
f {
result = "OK"
}
return result
} }