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