Files
kotlin/compiler/testData/codegen/box/objects/companionObjectAccess/privateCompanionObjectAccessedFromMethodInlinedInNestedClass.kt
2018-06-28 12:26:41 +02:00

18 lines
334 B
Kotlin
Vendored

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