Files
kotlin-fork/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.kt
T
Dmitry Petrov d1c5a42124 KT-36024 Generate adapted callable references as lambdas
Make sure both JVM and JVM_IR use the same information to determine
whether a callable reference requires argument adaptation.
2020-04-08 19:02:33 +02:00

12 lines
253 B
Kotlin
Vendored

fun useUnit0(fn: () -> Unit) {}
fun useUnit1(fn: (Int) -> Unit) {}
fun fn0() = 1
fun fn1(x: Int) = 1
fun fnv(vararg xs: Int) = 1
fun test0() = useUnit0(::fn0)
fun test1() = useUnit1(::fn1)
fun testV0() = useUnit0(::fnv)
fun testV1() = useUnit1(::fnv)