Kotlin equals gives true even if object parameters have different values

Ex :

data class A(val id: String, personName: PersonName) {

}

data class PersonName(name: String) {
}

val objA = A(“1”, PersonName(“A”))
val objB = objA.copy(personName = objA.personName.copy(name = “B”))

objA == objB (or) objA.equals(objB) gives True when it should be False

Sorry it was a bug in my code. Pls delete this post.