mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
20 lines
346 B
Kotlin
Vendored
20 lines
346 B
Kotlin
Vendored
// !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField
|
|
|
|
class Outer {
|
|
private companion object {
|
|
fun xo() = "O"
|
|
fun xk() = "K"
|
|
}
|
|
|
|
class Nested1 {
|
|
fun foo() = xo()
|
|
}
|
|
|
|
class Nested2 {
|
|
fun bar() = xk()
|
|
}
|
|
|
|
fun test() = Nested1().foo() + Nested2().bar()
|
|
}
|
|
|
|
fun box() = Outer().test() |