blob: 0da5b3b46556c84267fa312106e8ce5cb8205316 [file]
// RUN_PIPELINE_TILL: BACKEND
// 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")!><!COMPATIBILITY_WARNING!>call<!>(f)<!>
}
}
}
object Test2 {
fun call(r: Runnable) {}
object Scope {
fun call(r: SuspendRunnable) {}
fun bar(f: () -> Unit) {
<!DEBUG_INFO_CALL("fqName: Test2.Scope.call; typeCall: function")!>call(<!UNSUPPORTED_FEATURE!>f<!>)<!>
}
}
}
/* GENERATED_FIR_TAGS: funInterface, functionDeclaration, functionalType, interfaceDeclaration, nestedClass,
objectDeclaration, samConversion, suspend */