Files
kotlin-fork/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt
T
Alexander Udalov 1071919706 Remove backend tests on old inference
Also remove any mentions of NewInference, and rename some tests.
2021-11-09 20:07:33 +01:00

25 lines
403 B
Kotlin
Vendored

fun interface KRunnable {
fun run()
}
fun foo0() {}
fun foo1(vararg xs: Int): Int = 1
fun use(r: KRunnable) {}
fun testSamConstructor() =
KRunnable(::foo0)
// TODO should use an adapter function
fun testSamCosntructorOnAdapted() =
KRunnable(::foo1)
fun testSamConversion() {
use(::foo0)
}
// TODO should use an adapter function
fun testSamConversionOnAdapted() {
use(::foo1)
}