Files
kotlin-fork/compiler/testData/codegen/box/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt
T
2021-11-20 03:37:31 +03:00

20 lines
404 B
Kotlin
Vendored

// !LANGUAGE: +SuspendConversion
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: ChainedFunSuspendConversionForSimpleExpressionKt$box$1 cannot be cast to kotlin.jvm.functions.Function1
fun interface SuspendRunnable {
suspend fun invoke()
}
fun foo(s: SuspendRunnable) {}
fun test(f: () -> Unit) {
foo { }
foo(f)
}
fun box(): String {
test({ "" })
return "OK"
}