mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
15 lines
302 B
Kotlin
Vendored
15 lines
302 B
Kotlin
Vendored
// !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField
|
|
|
|
class Outer {
|
|
private companion object {
|
|
override fun toString(): String = "OK"
|
|
}
|
|
|
|
class Nested {
|
|
fun foo(): Any = Outer.Companion
|
|
}
|
|
|
|
fun test() = Nested().foo().toString()
|
|
}
|
|
|
|
fun box() = Outer().test() |