Files
kotlin/compiler/testData/codegen/boxAgainstJava/sam/adapters/implementAdapter.kt
2016-01-22 05:54:38 +03:00

12 lines
272 B
Kotlin
Vendored

class Impl: JavaInterface {
override fun foo(r: Runnable?) {
r?.run()
}
}
fun box(): String {
val fooMethods = Impl::class.java.getMethods().filter { it.getName() == "foo" }
if (fooMethods.size != 1) return fooMethods.toString()
return "OK"
}