Skip to content

Style cleanup for value class restriction overview #1822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _overviews/core/value-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ Full details on the implementation of value classes and their limitations may be
A value class ...

1. ... must have only a primary constructor with exactly one public, val parameter whose type is not a user-defined value class. (From Scala 2.11.0, the parameter may be non-public.)
2. ... may not have specialized type parameters.
2. ... may not have `@specialized` type parameters.
3. ... may not have nested or local classes, traits, or objects
4. ... may not define a equals or hashCode method.
4. ... may not define concrete `equals` or `hashCode` methods.
5. ... must be a top-level class or a member of a statically accessible object
6. ... can only have defs as members. In particular, it cannot have lazy vals, vars, or vals as members.
7. ... cannot be extended by another class.
Expand Down