Skip to content

Add C# 10 diagnostics for lambda expression#52094

Merged
BillWagner merged 10 commits intodotnet:mainfrom
BillWagner:lambda-expression-errors
Mar 5, 2026
Merged

Add C# 10 diagnostics for lambda expression#52094
BillWagner merged 10 commits intodotnet:mainfrom
BillWagner:lambda-expression-errors

Conversation

@BillWagner
Copy link
Member

@BillWagner BillWagner commented Mar 5, 2026

Fixes #51447

In addition, search for additional consolidation opportunities, and additional related errors and warnings that aren't documented, but should be included.

Finally, perform an edit pass to focus more on resolving the issues than diagnosing the cause.


Internal previews

📄 File 🔗 Preview link
docs/csharp/language-reference/compiler-messages/lambda-expression-errors.md Errors and warnings when using lambda expressions and anonymous functions
docs/csharp/language-reference/toc.yml docs/csharp/language-reference/toc
docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md Coming in C# 15

Copilot found several new opportunities for consolication
Rewrite the sections to focus on hose to fix errors, rather than the cause of the errors,
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@BillWagner BillWagner requested a review from Copilot March 5, 2026 17:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.

BillWagner and others added 2 commits March 5, 2026 14:06
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@BillWagner BillWagner requested a review from gewarren March 5, 2026 19:09
@BillWagner BillWagner merged commit ad6c28c into dotnet:main Mar 5, 2026
9 checks passed
@BillWagner BillWagner deleted the lambda-expression-errors branch March 5, 2026 20:34
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.

[C# 10 diagnostics] New lambda expression and delegate type errors

3 participants