# How to hide copy method of data class?

**URL:** <https://discuss.kotlinlang.org/t/how-to-hide-copy-method-of-data-class/27024>\
**Category:** Support\
**Created:** [July 1, 2023, 4:45pm UTC](https://discuss.kotlinlang.org/t/how-to-hide-copy-method-of-data-class/27024 "2023-07-01T16:45:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpdyj](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@cpdyj](https://discuss.kotlinlang.org/u/cpdyj)\
**Post date:** [July 1, 2023, 4:45pm UTC](https://discuss.kotlinlang.org/t/how-to-hide-copy-method-of-data-class/27024/1 "2023-07-01T16:45:56Z")

</div>

The copy method will breaks binary compatiblity.

---

<div class="post-metadata">

**Author:** ![broot](https://avatars.discourse-cdn.com/v4/letter/b/a88e57/32.png) [@broot](https://discuss.kotlinlang.org/u/broot)\
**Post date:** [July 1, 2023, 9:17pm UTC](https://discuss.kotlinlang.org/t/how-to-hide-copy-method-of-data-class/27024/2 "2023-07-01T21:17:30Z")

</div>

Do you mean it breaks compatibility if we add a new property? What about the constructor - it has the same problem. I guess we can always add a `copy` function manually if we add new props.
