Files
kotlin-fork/compiler/testData/diagnostics/tests/AbstractAccessor.fir.kt
T
Tianyu Geng 5bdea9652b 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.
2021-02-24 13:50:46 +03:00

22 lines
481 B
Kotlin
Vendored

abstract class My {
abstract var x: Int
public get
<!PRIVATE_SETTER_FOR_ABSTRACT_PROPERTY!>private<!> set
abstract val y: Int
protected get
abstract protected var z: Int
internal get
<!PRIVATE_SETTER_FOR_ABSTRACT_PROPERTY!>private<!> set
abstract internal val w: Int
protected get
abstract var u: Int
protected set
open var t: Int = 0
<!PRIVATE_SETTER_FOR_OPEN_PROPERTY!>private<!> set
}