Files
kotlin-fork/compiler/testData/diagnostics/tests/suspendConversion/suspendAndFunConversionInDisabledMode.fir.kt
T
2020-06-01 10:19:35 +03:00

32 lines
629 B
Kotlin
Vendored

// !LANGUAGE: -SuspendConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
fun interface SuspendRunnable {
suspend fun run()
}
object Test1 {
fun call(r: () -> Unit) {}
object Scope {
fun call(r: SuspendRunnable) {}
fun bar(f: () -> Unit) {
<!DEBUG_INFO_CALL("fqName: Test1.call; typeCall: function")!>call(f)<!>
}
}
}
object Test2 {
fun call(r: Runnable) {}
object Scope {
fun call(r: SuspendRunnable) {}
fun bar(f: () -> Unit) {
<!DEBUG_INFO_CALL("fqName: Test2.call; typeCall: function")!>call(f)<!>
}
}
}