Skip to content

Add errors and warnings for closed hierarchies#54550

Open
BillWagner wants to merge 6 commits into
dotnet:mainfrom
BillWagner:closed-hierarchies-diagnostics
Open

Add errors and warnings for closed hierarchies#54550
BillWagner wants to merge 6 commits into
dotnet:mainfrom
BillWagner:closed-hierarchies-diagnostics

Conversation

Add the new unions and closed hierarchies error codes to the correct file, and the TOC. Remove from the sorry file.
Copilot AI review requested due to automatic review settings June 26, 2026 15:45
@dotnetrepoman dotnetrepoman Bot added this to the June 2026 milestone Jun 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread docs/csharp/language-reference/toc.yml Outdated
@BillWagner BillWagner marked this pull request as ready for review June 26, 2026 17:51
@BillWagner BillWagner requested a review from a team as a code owner June 26, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C# 15-Errors and warnings]: New Feature - Closed hiearchies

2 participants