Use common instance receiver generation logic for 'this' expression
Otherwise it would skip private companion object accessor generation.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField
|
||||
// IGNORE_BACKEND: JS, JS_IR, JVM_IR
|
||||
|
||||
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