Files
kotlin-fork/backend.native/tests/external/codegen/box/closures/captureOuterProperty/inFunction.kt
T
2017-03-13 15:31:46 +03:00

14 lines
201 B
Kotlin

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()