Files
kotlin-fork/compiler/testData/diagnostics/tests/unitConversion/chainedUnitSuspendConversion.fir.kt
T
2020-06-05 13:24:20 +03:00

14 lines
362 B
Kotlin
Vendored

// !LANGUAGE: +UnitConversion +SuspendConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
fun foo(f: suspend () -> Unit) {}
fun bar(): String = ""
abstract class SubInt : () -> Int
fun test(g: () -> Double, s: SubInt) {
<!INAPPLICABLE_CANDIDATE!>foo<!>(::bar)
<!INAPPLICABLE_CANDIDATE!>foo<!>(g)
<!INAPPLICABLE_CANDIDATE!>foo<!>(s)
}