mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
14 lines
280 B
Kotlin
Vendored
14 lines
280 B
Kotlin
Vendored
interface A {
|
|
fun visit(a:String, b:String="") : String = b + a
|
|
}
|
|
|
|
class B : A {
|
|
override fun visit(a:String, b:String) : String = b + a
|
|
}
|
|
|
|
fun box(): String {
|
|
val result = B().visit("K", "O")
|
|
if (result != "OK") return "fail $result"
|
|
|
|
return B().visit("OK")
|
|
} |