Files
kotlin-fork/nj2k/testData/newJ2k/function/externalFunctionalInterface.kt
T
Roman Golyshev 4042214bb2 Fix tests broken by enhanced RedundantSamConstructor inspection
- The inspection now works in more cases, so the test data had to be
updated accordingly
2020-02-20 17:27:41 +03:00

13 lines
278 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, { x: Int -> this.toDouble(x) })
}
}