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:
+12
-4
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user