14 lines
201 B
Kotlin
Vendored
14 lines
201 B
Kotlin
Vendored
interface T {
|
|
fun result(): String
|
|
}
|
|
|
|
class A(val x: String) {
|
|
fun foo() = object : T {
|
|
fun bar() = x
|
|
|
|
override fun result() = bar()
|
|
}
|
|
}
|
|
|
|
fun box() = A("OK").foo().result()
|