Files
kotlin-fork/compiler/testData/codegen/box/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt
T
Dmitry Petrov d41fc0b599 PSI2IR fix suspend conversion tests
- support chained suspend conversion + SAM conversion
- support suspend conversion in vararg elements
2021-07-17 09:10:19 +03:00

19 lines
285 B
Kotlin
Vendored

// !LANGUAGE: +SuspendConversion
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
fun interface SuspendRunnable {
suspend fun invoke()
}
fun foo(s: SuspendRunnable) {}
fun test(f: () -> Unit) {
foo { }
foo(f)
}
fun box(): String {
test({ "" })
return "OK"
}