Files
kotlin-fork/compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt
T
2020-08-10 22:04:16 +03:00

14 lines
254 B
Kotlin
Vendored

// !LANGUAGE: +SuspendConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun interface SuspendRunnable {
<!FUN_INTERFACE_WITH_SUSPEND_FUNCTION!>suspend<!> fun invoke()
}
fun foo(s: SuspendRunnable) {}
fun test(f: () -> Unit) {
foo { }
foo(f)
}