Files
kotlin-fork/compiler/testData/codegen/box/objects/companionObjectAccess/privateCompanionObjectAccessedFromLambdaInNestedClass.kt
T

17 lines
299 B
Kotlin
Vendored

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