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

16 lines
293 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()