Files
kotlin-fork/compiler/testData/codegen/box/objects/companionObjectAccess/kt27117_lv12.kt
T

17 lines
294 B
Kotlin
Vendored

// !LANGUAGE: -ProperVisibilityForCompanionObjectInstanceField
inline fun on(body: () -> Any) = body().toString()
class A {
fun test() = foo()
private companion object {
private fun foo() = on { this }
override fun toString() = "OK"
}
}
fun box() = A().test()