mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
18 lines
362 B
Kotlin
Vendored
18 lines
362 B
Kotlin
Vendored
// !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
|
|
class Outer {
|
|
private companion object {
|
|
val result = "OK"
|
|
}
|
|
|
|
class Nested {
|
|
fun foo() = object {
|
|
override fun toString(): String = result
|
|
}
|
|
}
|
|
|
|
fun test() = Nested().foo().toString()
|
|
}
|
|
|
|
fun box() = Outer().test() |