data class Cat(var age: Int) val myCat = Cat(age = 2) val anotherCat = myCat.copy(age = 2) anotherCat.age++ assert(myCat.age == 2) // Would fail if copy returned the same reference.