12 lines
155 B
Kotlin
Vendored
12 lines
155 B
Kotlin
Vendored
interface A {
|
|
fun foo() : Int
|
|
}
|
|
|
|
class B : A {
|
|
override fun foo() = 10
|
|
}
|
|
fun foo(b: B) : Int {
|
|
val o = object : A by b {}
|
|
return o.foo()
|
|
}
|