Files
kotlin-fork/nj2k/testData/newJ2k/function/externalKtFunctionalInterface.kt
T
Dmitry Gridin 70185ba2a6 Formatter, NJ2K: fix indent for comments inside function literals
#KT-4194 Fixed
#KT-31881 Fixed
#KT-34673 Fixed
#KT-35152 Fixed
2019-11-29 16:28:59 +07:00

15 lines
405 B
Kotlin
Vendored

// ERROR: Interface FunctionalI does not have constructors
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 {
//TODO explicitlly call apply here
return foo(1, FunctionalI<Int, Double> { x: Int -> this.toDouble(x) })
}
}