Skip to content

Commit

Permalink
chore: fix data classes members formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahhaggarty committed Aug 1, 2023
1 parent 8dd5640 commit 75a9d1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/topics/data-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ To ensure consistency and meaningful behavior of the generated code, data classe

Additionally, the generation of data class members follows these rules with regard to the members' inheritance:

* If there are explicit implementations of `equals()`, `hashCode()`, or `toString()` in the data class body or
* If there are explicit implementations of `.equals()`, `.hashCode()`, or `.toString()` in the data class body or
`final` implementations in a superclass, then these functions are not generated, and the existing
implementations are used.
* If a supertype has `componentN()` functions that are `open` and return compatible types, the
* If a supertype has `.componentN()` functions that are `open` and return compatible types, the
corresponding functions are generated for the data class and override those of the supertype. If the functions of the
supertype cannot be overridden due to incompatible signatures or due to their being final, an error is reported.
* Providing explicit implementations for the `componentN()` and `copy()` functions is not allowed.
* Providing explicit implementations for the `.componentN()` and `.copy()` functions is not allowed.

Data classes may extend other classes (see [Sealed classes](sealed-classes.md) for examples).

Expand Down

0 comments on commit 75a9d1c

Please sign in to comment.