mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
18 lines
271 B
Kotlin
Vendored
18 lines
271 B
Kotlin
Vendored
interface A {
|
|
fun foo(): Int
|
|
}
|
|
|
|
interface B {
|
|
fun foo(): Int
|
|
}
|
|
|
|
class Z(val a: A) : A by a, B
|
|
|
|
fun box(): String {
|
|
val s = Z(object : A {
|
|
override fun foo(): Int {
|
|
return 1;
|
|
}
|
|
});
|
|
return if (s.foo() == 1) "OK" else "fail"
|
|
} |