JS: fix translation of callable reference to property of outer class with private setter
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
class A {
|
||||
var value: String = "fail1"
|
||||
private set
|
||||
|
||||
inner class B {
|
||||
fun foo(): kotlin.reflect.KMutableProperty0<String> = this@A::value
|
||||
}
|
||||
}
|
||||
|
||||
class C {
|
||||
var value: String = "fail2"
|
||||
private set
|
||||
|
||||
fun bar(): kotlin.reflect.KMutableProperty0<String> {
|
||||
class D {
|
||||
fun foo(): kotlin.reflect.KMutableProperty0<String> = this@C::value
|
||||
}
|
||||
|
||||
return D().foo()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
a.B().foo().set("O")
|
||||
|
||||
val c = C()
|
||||
c.bar().set("K")
|
||||
|
||||
return a.value + c.value
|
||||
}
|
||||
Reference in New Issue
Block a user