Skip to content

Align addition of a synthesized override of object.GetHashCode() in records with the latest design.#45518

Merged
AlekseyTs merged 1 commit intodotnet:masterfrom
AlekseyTs:Records_12
Jul 1, 2020
Merged

Align addition of a synthesized override of object.GetHashCode() in records with the latest design.#45518
AlekseyTs merged 1 commit intodotnet:masterfrom
AlekseyTs:Records_12

Conversation

@AlekseyTs
Copy link
Contributor

Related to #45296.

From specification:
The record type includes a synthesized override of object.GetHashCode(). The method can be declared explicitly. It is an error if the explicit declaration is sealed unless the record type is sealed.

…ecords with the latest design.

Related to dotnet#45296.

From specification:
The record type includes a synthesized override of object.GetHashCode(). The method can be declared explicitly. It is an error if the explicit declaration is sealed unless the record type is sealed.
/// <summary>
/// Returns true if reported an error
/// </summary>
internal static bool VerifyOerridesMethodFromObject(MethodSymbol overriding, DiagnosticBag diagnostics)
Copy link
Member

@333fred 333fred Jun 29, 2020

Choose a reason for hiding this comment

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

VerifyOerridesMethodFromObject [](start = 29, length = 30)

Typo: Oerrides->Overrides #Pending

internal override bool IsMetadataNewSlot(bool ignoreInterfaceImplementationChanges = false) => false;

internal override bool IsMetadataVirtual(bool ignoreInterfaceImplementationChanges = false) => true;
protected override (TypeWithAnnotations ReturnType, ImmutableArray<ParameterSymbol> Parameters, bool IsVararg, ImmutableArray<TypeParameterConstraintClause> DeclaredConstraintsForOverrideOrImplement) MakeParametersAndBindReturnType(DiagnosticBag diagnostics)
Copy link
Member

@333fred 333fred Jun 29, 2020

Choose a reason for hiding this comment

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

Implement [](start = 197, length = 9)

Should this be Implementation? #Pending

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this be Implementation?

Sounds fine to me as it is, are you proposing to make it longer? Do you think someone might get confused? If you'd like I can do a rename in a separate PR since this name wasn't introduced in this PR


In reply to: 447226886 [](ancestors = 447226886)

Copy link
Member

Choose a reason for hiding this comment

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

Do you think someone might get confused?

Yes. I don't know what Implement means here. I assume it means implementation, but it's not clear.

If you'd like I can do a rename in a separate PR since this name wasn't introduced in this PR

That's fine. I'll mark this active again for you to keep track.


In reply to: 447269453 [](ancestors = 447269453,447226886)

@AlekseyTs
Copy link
Contributor Author

@cston, @jcouv , @RikkiGibson, @dotnet/roslyn-compiler, @agocke Please review

Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

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

LGTM (commit 1) with renaming feedback either here or in a followup PR.

@AlekseyTs
Copy link
Contributor Author

AlekseyTs commented Jun 29, 2020

@cston, @jcouv , @RikkiGibson, @dotnet/roslyn-compiler, @agocke Please review, need a second sign-off

2 similar comments
@AlekseyTs
Copy link
Contributor Author

@cston, @jcouv , @RikkiGibson, @dotnet/roslyn-compiler, @agocke Please review, need a second sign-off

@AlekseyTs
Copy link
Contributor Author

@cston, @jcouv , @RikkiGibson, @dotnet/roslyn-compiler, @agocke Please review, need a second sign-off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants