FIR: Handle visibility of public setter of protected synthetic property like in K1

K1 allows writing access to a public setter of a protected synthetic
property only if the call is inside a subclass. K2 previously allowed
that unconditionally. This changes brings the behavior in line with K1.

^KT-56050 Fixed
This commit is contained in:
Kirill Rakhman
2023-01-24 15:38:52 +01:00
committed by Space Team
parent 1990883bdc
commit f6c189be7b
5 changed files with 254 additions and 18 deletions
@@ -5,8 +5,8 @@ import JavaClass
fun foo(javaClass: JavaClass) {
val v = javaClass.<!INVISIBLE_REFERENCE!>something<!>
javaClass.something = 1
javaClass.<!INVISIBLE_REFERENCE!>something<!>++
javaClass.<!INVISIBLE_REFERENCE!>something<!> = 1
javaClass.<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>something<!>++
}
// FILE: JavaClass.java