Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner November 10, 2025 12:46
return obj is Program program &&
b == program.b &&
EqualityComparer<HashSet<string>>.Default.Equals(s, program.s);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

View with whitespace off.

{
int a;
public virtual bool Equals(Program program)
Copy link
Member

Choose a reason for hiding this comment

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

question - should this be generated as Program?

Copy link
Member Author

Choose a reason for hiding this comment

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

yup :)

@CyrusNajmabadi CyrusNajmabadi enabled auto-merge (rebase) November 10, 2025 18:08

return CreateEqualsMethod(
compilation,
modifiers: isRecord ? containingType.IsSealed ? DeclarationModifiers.None : DeclarationModifiers.Virtual : null,
Copy link
Member

Choose a reason for hiding this comment

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

Is it easier just to have the 'null' case be explicitly passing Overrides rather than defaulting it in the method? Looks like there's only two use sites...

@CyrusNajmabadi CyrusNajmabadi merged commit 9d62c7d into dotnet:main Nov 10, 2025
25 of 26 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the genEqualsRecords branch November 10, 2025 19:44
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Nov 10, 2025
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.

3 participants