mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
29 lines
355 B
Kotlin
Vendored
29 lines
355 B
Kotlin
Vendored
// FILE: JavaCall.java
|
|
|
|
class JavaCall {
|
|
String call(Test test) {
|
|
return test.call();
|
|
}
|
|
}
|
|
|
|
// FILE: Test.java
|
|
|
|
interface Test {
|
|
|
|
String call();
|
|
|
|
default String test() {
|
|
return "K";
|
|
}
|
|
|
|
static String testStatic() {
|
|
return "K";
|
|
}
|
|
}
|
|
|
|
// FILE: sam.kt
|
|
|
|
fun box(): String {
|
|
return JavaCall().call {"OK"}
|
|
}
|