Add errors and warnings for closed hierarchies#54550
Open
BillWagner wants to merge 6 commits into
Open
Conversation
Add the new unions and closed hierarchies error codes to the correct file, and the TOC. Remove from the sorry file.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the C# compiler diagnostics documentation to cover new closed hierarchy errors and consolidates a few remaining union-related diagnostics into the relevant reference pages.
Changes:
- Updates the union diagnostics article to include closed hierarchy diagnostics (CS9380–CS9384) and additional union-member-provider diagnostics (CS9385–CS9387).
- Moves CS9372 indexing to the pattern matching diagnostics page and updates the C# language reference TOC metadata accordingly.
- Removes union/closed-hierarchy error codes from the generic “no specifics” fallback page now that dedicated coverage exists.
Reviewed changes
Copilot reviewed 4 out of 4 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 union/closed-hierarchy codes from the fallback keyword list. |
| docs/csharp/language-reference/toc.yml | Renames the union entry and updates diagnostic keyword indexing in TOC metadata. |
| docs/csharp/language-reference/compiler-messages/union-declaration-errors.md | Expands coverage to include closed hierarchy and union-member-provider diagnostics. |
| docs/csharp/language-reference/compiler-messages/pattern-matching-warnings.md | Adds CS9372 indexing and guidance in the pattern matching diagnostics page. |
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 #54016
Pick up a few outstanding union based errors as well.
Internal previews