mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 08:31:26 +00:00
19 lines
287 B
Kotlin
Vendored
19 lines
287 B
Kotlin
Vendored
interface I {
|
|
val String.foo: String
|
|
get() = this + ";" + bar()
|
|
|
|
fun bar(): String
|
|
}
|
|
|
|
class C : I {
|
|
override fun bar() = "C.bar"
|
|
|
|
fun test() = "test".foo
|
|
}
|
|
|
|
fun box(): String {
|
|
val r = C().test()
|
|
if (r != "test;C.bar") return "fail: $r"
|
|
|
|
return "OK"
|
|
} |