Add diagnostics for record struct and record class declarations#52106
Open
BillWagner wants to merge 7 commits intodotnet:mainfrom
Open
Add diagnostics for record struct and record class declarations#52106BillWagner wants to merge 7 commits intodotnet:mainfrom
BillWagner wants to merge 7 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR documents C# 9 and C# 10 compiler diagnostics related to record, record struct, and record class declarations, and wires the new documentation into the C# language reference navigation so F1/help keyword routing can land on a specific article instead of the generic “no specifics” page.
Changes:
- Add a new “Record declarations” compiler-messages article covering CS8851, CS8858–CS8866, CS8870–CS8879, CS8907–CS8908, and CS8913.
- Add the new article to the C# language reference TOC under “C# compiler messages”.
- Remove newly documented diagnostic IDs from the generic “Sorry, we don’t have specifics…” fallback list.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md | Removes record-related diagnostic IDs that are now covered by a dedicated article. |
| docs/csharp/language-reference/toc.yml | Adds a new TOC entry for the record-declarations diagnostics article. |
| docs/csharp/language-reference/compiler-messages/record-declaration-errors.md | New documentation page describing record declaration-related errors/warnings and how to resolve them. |
docs/csharp/language-reference/compiler-messages/record-declaration-errors.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #51449
Add a new file with the diagnostics for record struct and record class types.
Internal previews