blob: 8e9292d6418cccee136f78ea0d541b1dc7e41776 [file]
// FIR_IDENTICAL
// RUN_PIPELINE_TILL: CODEGEN
// FIR_DUMP
// LANGUAGE: +UnitConversionsOnArbitraryExpressions
// 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(f)
foo(s)
foo(::bar)
}
/* GENERATED_FIR_TAGS: callableReference, classDeclaration, funInterface, functionDeclaration, functionalType,
interfaceDeclaration, samConversion, stringLiteral, suspend */