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

15 lines
359 B
Kotlin
Vendored

// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionalInterfaceConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER -NOTHING_TO_INLINE
fun interface SuspendRunnable {
<!FUN_INTERFACE_WITH_SUSPEND_FUNCTION!>suspend<!> fun invoke()
}
fun run(r: SuspendRunnable) {}
suspend fun bar() {}
fun test() {
run(::bar)
}