it uses the hashcodes of the vals?
# announcements
d
it uses the hashcodes of the vals?
r
Yeah. You can decompile the generated bytecode for a data class and see that a data class defined like this:
Copy code
data class Person(val string: String, val int: Int, val any: Any)
has a generated hashcode function that boils down to something like this this:
Copy code
override fun hashCode(): Int {
        return ((string?.hashCode() ?: 0) * 31 + int * 31) + (any?.hashCode() ?: 0)
    }
✔️ 1