mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
18 lines
334 B
Kotlin
Vendored
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() |