FIR: fix position and reporting of PRIVATE_SETTER_*
Previously `FirPropertyAccessor.source` references the `KtProperty` if the user code contains a setter or getter that doesn't contain a body. For example, with the following ``` val i: Int = 1 private set ``` The `FirPropertyAccessor` would reference the `KtProperty` as the source. This change makes `FirPropertyAccessor` reference `KtPropertyAccessor` as the source if possible, regardless of whether the body is present or not.
This commit is contained in:
committed by
Mikhail Glukhikh
parent
bdeecfc188
commit
5bdea9652b
@@ -5,11 +5,11 @@ interface Test<in I, out O> {
|
||||
<!PRIVATE_PROPERTY_IN_INTERFACE!>private<!> val private_val: I
|
||||
|
||||
var interlan_private_set: O
|
||||
private set
|
||||
<!PRIVATE_SETTER_FOR_ABSTRACT_PROPERTY!>private<!> set
|
||||
public var public_private_set: O
|
||||
private set
|
||||
<!PRIVATE_SETTER_FOR_ABSTRACT_PROPERTY!>private<!> set
|
||||
protected var protected_private_set: O
|
||||
private set
|
||||
<!PRIVATE_SETTER_FOR_ABSTRACT_PROPERTY!>private<!> set
|
||||
<!PRIVATE_PROPERTY_IN_INTERFACE!>private<!> var private_private_set: O
|
||||
private set
|
||||
|
||||
@@ -17,4 +17,4 @@ interface Test<in I, out O> {
|
||||
public fun public_fun(i: O) : I
|
||||
protected fun protected_fun(i: O) : I
|
||||
<!PRIVATE_FUNCTION_WITH_NO_BODY!>private<!> fun private_fun(i: O) : I
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user