Files
kotlin/compiler/testData/codegen/box/objects/companionObjectAccess/privateCompanionObjectAccessedFromMethodInlinedInNestedClass.kt
2018-06-22 16:53:07 +03:00

17 lines
308 B
Kotlin
Vendored

// !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField
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()