Files
kotlin-fork/idea/testData/inspectionsLocal/selfAssignment/applyIncorrect.kt.after
T
2017-11-02 11:07:52 +03:00

17 lines
309 B
Plaintext
Vendored

// PROBLEM: Variable 'city' is assigned to itself
// WITH_RUNTIME
// FIX: Remove self assignment
// Minimized from KT-20714 itself
class ServerUser {
var id = ""
var city = ""
fun toClientUser() = ClientUser().apply {
id = this@ServerUser.id
}
}
class ClientUser {
var id = ""
}