From 04e750a6474d5ec5a530be7ac81198051dcb85e6 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sat, 25 Apr 2020 01:59:00 -0700 Subject: [PATCH 1/2] Update spec for record value equality --- proposals/records-wip.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/proposals/records-wip.md b/proposals/records-wip.md index daccf36e7d..7d7b3cc5d4 100644 --- a/proposals/records-wip.md +++ b/proposals/records-wip.md @@ -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 +true if and only if all the instance fields of the receiver type are equal +to the fields of the other type. + `object.Equals` performs the equivalent of ```C# From e5f6c760a4a5b557f86535bb688ee8dba188f511 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Thu, 30 Apr 2020 13:56:23 -0700 Subject: [PATCH 2/2] Update records-wip.md --- proposals/records-wip.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proposals/records-wip.md b/proposals/records-wip.md index 7d7b3cc5d4..d3a94b83ba 100644 --- a/proposals/records-wip.md +++ b/proposals/records-wip.md @@ -68,8 +68,8 @@ Record types produce synthesized implementations for the following methods: * `T Equals(T)` method, where `T` is the current type `T Equals(T)` is specified to perform value equality such that `Equals` is -true if and only if all the instance fields of the receiver type are equal -to the fields of the other type. +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