Files
kotlin/compiler/testData/codegen/box/objects/companionObjectAccess/privateCompanionObjectAccessedFromLambdaInNestedClass.kt
2019-11-19 11:00:09 +03:00

16 lines
292 B
Kotlin
Vendored

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