7f627ab480
These are mostly mechanical changes.
31 lines
550 B
Kotlin
Vendored
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--
|
|
}
|