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

15 lines
248 B
Kotlin
Vendored

// !LANGUAGE: +UnitConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
fun interface KRunnable {
fun run()
}
fun foo(r: KRunnable) {}
abstract class SubInt : () -> Int
fun test(f: () -> Int, s: SubInt) {
foo(f)
foo(s)
}