mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
21 lines
285 B
Kotlin
Vendored
21 lines
285 B
Kotlin
Vendored
// FILE: B.java
|
|
|
|
class B {
|
|
static String test(A x) {
|
|
return A.DefaultImpls.foo(x);
|
|
}
|
|
}
|
|
|
|
// FILE: main.kt
|
|
|
|
interface A {
|
|
fun foo() = "OK"
|
|
}
|
|
|
|
fun box(): String {
|
|
val result = B.test(object : A {})
|
|
if (result != "OK") return "fail: $result"
|
|
|
|
return "OK"
|
|
}
|