Skip to content

Add C# 9 diagnostics for record types#53507

Open
BillWagner wants to merge 4 commits intodotnet:mainfrom
BillWagner:record-declaration-diagnostics
Open

Add C# 9 diagnostics for record types#53507
BillWagner wants to merge 4 commits intodotnet:mainfrom
BillWagner:record-declaration-diagnostics

Conversation

@BillWagner
Copy link
Copy Markdown
Member

@BillWagner BillWagner commented Apr 30, 2026

Copy link
Copy Markdown
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

Adds documentation coverage for previously undocumented C# 9 compiler diagnostics related to record types, and wires those diagnostics into navigation and keyword indexing so they no longer appear on the “no specifics” page.

Changes:

  • Removes record-related diagnostics from the catch-all “Sorry, we don't have specifics…” list.
  • Adds CS8857, CS8869, CS8871, CS8876, and CS8906 to the dedicated “record declarations” compiler-messages article (keywords, summaries, and guidance).
  • Updates the C# language reference TOC search/display metadata to include the newly documented diagnostic IDs.

Reviewed changes

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

File Description
docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md Removes diagnostics that are now documented elsewhere.
docs/csharp/language-reference/toc.yml Updates TOC metadata so the record diagnostics are discoverable via the record declarations page.
docs/csharp/language-reference/compiler-messages/record-declaration-errors.md Documents the newly covered record diagnostics and updates keyword metadata accordingly.

Comment thread docs/csharp/language-reference/compiler-messages/record-declaration-errors.md Outdated
Comment thread docs/csharp/language-reference/compiler-messages/record-declaration-errors.md Outdated
Comment thread docs/csharp/language-reference/compiler-messages/record-declaration-errors.md Outdated
BillWagner and others added 2 commits April 30, 2026 11:01
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Rework one corrective recommendations.
@BillWagner BillWagner requested a review from adegeo April 30, 2026 15:10
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# 9 diagnostics] Errors and warnings related to record types

2 participants