af6e744b65
^KT-15262 Fixed
33 lines
839 B
Plaintext
Vendored
33 lines
839 B
Plaintext
Vendored
class Test {
|
|
var serial: String = ""
|
|
set(value) {
|
|
field = value.toUpperCase()
|
|
}
|
|
var name: String = ""
|
|
val age by lazy { 15 + 10 }
|
|
val color: String
|
|
get() = "Purple"
|
|
|
|
<caret>override fun equals(other: Any?): Boolean {
|
|
if (this === other) return true
|
|
if (javaClass != other?.javaClass) return false
|
|
|
|
other as Test
|
|
|
|
if (serial != other.serial) return false
|
|
if (name != other.name) return false
|
|
if (age != other.age) return false
|
|
if (color != other.color) return false
|
|
|
|
return true
|
|
}
|
|
|
|
override fun hashCode(): Int {
|
|
var result = serial.hashCode()
|
|
result = 31 * result + name.hashCode()
|
|
result = 31 * result + age
|
|
result = 31 * result + color.hashCode()
|
|
return result
|
|
}
|
|
|
|
} |