Files
kotlin/compiler/testData/codegen/box/objects/companionObjectAccess/privateCompanionObjectAccessedFromLambdaInNestedClass.kt
2018-08-09 14:22:50 +03:00

15 lines
262 B
Kotlin
Vendored

// !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField
class Outer {
private companion object {
val result = "OK"
}
class Nested {
fun foo() = { result }()
}
fun test() = Nested().foo()
}
fun box() = Outer().test()