Skip to content

Conversation

@Xulei-NL
Copy link
Contributor

@Xulei-NL Xulei-NL commented Oct 14, 2025

Summary

As discussed in #49117, the first case The candidate name is a member name of an anonymous type, such as ToString or GetHashCode. should be removed since the C# language specification does not specify it. For more details please see #49117.

Fixes #49117


Internal previews

📄 File 🔗 Preview link
docs/csharp/fundamentals/types/anonymous-types.md Anonymous types

@Xulei-NL Xulei-NL requested review from a team and BillWagner as code owners October 14, 2025 15:14
@dotnetrepoman dotnetrepoman bot added this to the October 2025 milestone Oct 14, 2025
@dotnet-policy-service dotnet-policy-service bot added dotnet-csharp/svc fundamentals/subsvc community-contribution Indicates PR is created by someone from the .NET community. labels Oct 14, 2025
Copy link
Contributor

@meaghanlewis meaghanlewis left a comment

Choose a reason for hiding this comment

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

@Xulei-NL thanks for your contribution!

@meaghanlewis meaghanlewis merged commit 6e361e3 into dotnet:main Oct 14, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-csharp/svc fundamentals/subsvc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The first case for name inference in Projection initializers is wrong

2 participants