Skip to content
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

Update spec for record value equality #3396

Merged
merged 2 commits into from
May 24, 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
6 changes: 4 additions & 2 deletions proposals/records-wip.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ Record types produce synthesized implementations for the following methods:
* `object.Equals(object)` override, unless it is sealed or user provided
* `T Equals(T)` method, where `T` is the current type

`T Equals(T)` is specified to perform value equality, comparing the property with same name as
each primary constructor parameter to the corresponding property of the other type.
`T Equals(T)` is specified to perform value equality such that `Equals` is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specified [](start = 17, length = 9)

Where can we find this specification you speak of? ;)

true if and only if all the instance fields declared in the receiver type
are equal to the fields of the other type.

`object.Equals` performs the equivalent of

```C#
Expand Down