Files
kotlin-fork/nj2k/testData/newJ2k/function/externalFunctionalInterface.kt
T
Ilya Kirillov f79b282c60 New J2K: add better support of implicit functional interfaces
#KT-32702 fixed
#KT-19327 fixed
2019-07-25 14:34:34 +03:00

13 lines
290 B
Kotlin
Vendored

internal class Test {
fun <A, B> foo(value: A, `fun`: FunctionalI<A, B>): B {
return `fun`.apply(value)
}
fun toDouble(x: Int): Double {
return x.toDouble()
}
fun nya(): Double {
return foo(1, FunctionalI { x: Int -> this.toDouble(x) })
}
}