Fix building fake overrides for sam and function references

This commit is contained in:
Pavel Kunyavskiy
2022-09-27 12:04:33 +02:00
committed by Space Team
parent 95eaf3d234
commit ea3713f051
5 changed files with 48 additions and 31 deletions
@@ -11,11 +11,20 @@ import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
import helpers.EmptyContinuation
suspend fun run(block: suspend () -> Unit) = A(block).run()
suspend fun runA(block: suspend () -> Unit) = A(block).run()
suspend fun runC(block: suspend () -> Unit) = C(block).run()
fun box(): String {
suspend {
run {}
runA {}
runC {}
A { }.run()
C { }.run()
}.startCoroutine(EmptyContinuation)
return "OK"
}
// FILE: c.kt
fun interface C {
suspend fun run()
}