blob: 1afd0d90134395c631abb5444cb182950cc10983 [file]
// !LANGUAGE: +UnitConversionsOnArbitraryExpressions +SuspendConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
fun interface SuspendRunnable {
suspend fun run()
}
fun foo(r: SuspendRunnable) {}
fun bar(): String = ""
abstract class SubInt : () -> Int
fun test(f: () -> String, s: SubInt) {
foo(<!ARGUMENT_TYPE_MISMATCH!>f<!>)
foo(<!ARGUMENT_TYPE_MISMATCH!>s<!>)
foo(::bar)
}