mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
15 lines
160 B
Kotlin
Vendored
15 lines
160 B
Kotlin
Vendored
interface T {
|
|
fun foo(): String
|
|
}
|
|
|
|
val o = object : T {
|
|
val a = "OK"
|
|
val f = {
|
|
a
|
|
}()
|
|
|
|
override fun foo() = f
|
|
}
|
|
|
|
fun box() = o.foo()
|