mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
14 lines
298 B
Kotlin
Vendored
14 lines
298 B
Kotlin
Vendored
interface Base {
|
|
fun bar(a: String = "abc"): String = a + " from interface"
|
|
}
|
|
|
|
class Derived: Base {
|
|
override fun bar(a: String): String = a + " from class"
|
|
}
|
|
|
|
fun box(): String {
|
|
val result = Derived().bar()
|
|
if (result != "abc from class") return "Fail: $result"
|
|
|
|
return "OK"
|
|
} |