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

17 lines
341 B
Kotlin
Vendored

// !LANGUAGE: +UnitConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
fun foo(f: () -> Unit) {}
fun <T> fooGeneric(f: (T) -> Unit): T = TODO()
fun bar(): String = ""
fun createCall(): () -> Int = TODO()
fun test(g: () -> String, h: (Float) -> String) {
foo(::bar)
foo { "something" }
foo(g)
fooGeneric(h)
}