mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
23 lines
355 B
Kotlin
Vendored
23 lines
355 B
Kotlin
Vendored
// FILE: Simple.java
|
|
|
|
interface Simple {
|
|
default String test(String s) {
|
|
return s + "K";
|
|
}
|
|
|
|
static String testStatic(String s) {
|
|
return s + "K";
|
|
}
|
|
}
|
|
|
|
// FILE: main.kt
|
|
|
|
class Test : Simple {}
|
|
|
|
fun box(): String {
|
|
val test = Test().test("O")
|
|
if (test != "OK") return "fail $test"
|
|
|
|
return Simple.testStatic("O")
|
|
}
|