Postpone companion object field visibility
Have to reconsider this issue because of interface companion objects.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// LANGUAGE_VERSION: 1.3
|
||||
|
||||
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()
|
||||
Reference in New Issue
Block a user