Files
kotlin-fork/plugins/uast-kotlin/testData/PropertyReferences.kt
T
Jinseong Jeon 7f627ab480 FIR UAST: track all legacy test data since facade class is converted
These are mostly mechanical changes.
2021-05-06 20:19:29 +02:00

31 lines
550 B
Kotlin
Vendored

class A(init: Int) {
private var privateProp = 0 // accesses should be field accesses
var mutableProp: Int
init {
mutableProp = init
}
fun add(x: Int): Int {
val result = privateProp
privateProp = x
return privateProp
}
}
fun properties() {
val a = A(17)
val x = -a.mutableProp
a.mutableProp = 1
a.mutableProp += x
++a.mutableProp
a.mutableProp--
}
fun A.ext() {
val x = -mutableProp
mutableProp = 1
mutableProp += x
++mutableProp
mutableProp--
}