mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
15 lines
262 B
Kotlin
Vendored
15 lines
262 B
Kotlin
Vendored
// !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField
|
|
|
|
class Outer {
|
|
private companion object {
|
|
val result = "OK"
|
|
}
|
|
|
|
class Nested {
|
|
fun foo() = { result }()
|
|
}
|
|
|
|
fun test() = Nested().foo()
|
|
}
|
|
|
|
fun box() = Outer().test() |