mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
25 lines
321 B
Kotlin
Vendored
25 lines
321 B
Kotlin
Vendored
interface A {
|
|
fun test(): String
|
|
}
|
|
|
|
interface B {
|
|
fun test(): String
|
|
}
|
|
|
|
interface C: A, B
|
|
|
|
class Z(val param: String): C {
|
|
|
|
override fun test(): String {
|
|
return param
|
|
}
|
|
}
|
|
|
|
public class MyClass(val value : C) : C by value {
|
|
|
|
}
|
|
|
|
fun box(): String {
|
|
val s = MyClass(Z("OK"))
|
|
return s.test()
|
|
} |