Files
kotlin-fork/j2k/testData/fileOrElement/detectProperties/AssignFieldInsideSetter2.kt
T
2016-04-29 18:13:51 +03:00

17 lines
283 B
Kotlin
Vendored

class C {
private var x = ""
internal var other: C? = null
fun getX(): String {
return x
}
internal fun setX(x: String) {
println("setter invoked")
if (other != null) {
this.other!!.x = x
}
this.x = x
}
}