Skip to content

Conversation

BillWagner
Copy link
Member

@BillWagner BillWagner commented Oct 15, 2025

Fixes #46452

Contributes to curation goal.

Add errors and warnings generated for new compound assignment operators.
Look for any additional undocumented errors and warnings related to overloaded operators. Those related to checked and unchecked operators were added.
Consolidate other error related to overloading operators; provide links to language reference and operator pages for additional context.


Internal previews

📄 File 🔗 Preview link
.github/prompts/error-consolidation.md Copilot prompts to consolidate error codes.
docs/csharp/language-reference/compiler-messages/overloaded-operator-errors.md Errors and warnings for overloaded, or user-defined operator declarations
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 C# 14 errors begin here
docs/fundamentals/code-analysis/quality-rules/ca2224.md "CA2224: Override equals on overloading operator equals"

Run through all identified related errors and add them into the new file.
Search the roslyn source and the "no specifics" source file to find any related missing errors and warnings.
Copy link
Contributor

@Copilot 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

This PR consolidates compiler diagnostics related to operator overloading into a single comprehensive error page, addressing issue #46452 and supporting curation goals. The consolidation moves 27 individual error/warning pages from the misc folder into a new organized article that groups related diagnostics by theme.

Key Changes:

  • Created a new consolidated error page (overloaded-operator-errors.md) with thematic sections for operator-related diagnostics
  • Added documentation for previously undocumented errors (CS9023-CS9025, CS9308-CS9313, CS8930-CS8931)
  • Removed 27 individual error pages and established redirects to the consolidated page

Reviewed Changes

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

Show a summary per file
File Description
overloaded-operator-errors.md New consolidated error page with 39 operator-related diagnostics organized into 8 thematic sections
toc.yml Added new consolidated page entry and removed 27 individual error entries
.openpublishing.redirection.csharp.json Added 29 redirects from deleted individual pages to new consolidated page
sorry-we-don-t-have-specifics-on-this-csharp-error.md Removed now-documented error codes (CS9023-CS9025, CS9308-CS9313)
Various cs*.md files Deleted 27 individual error pages now consolidated
error-consolidation.md Updated workflow documentation for future consolidation efforts
Comments suppressed due to low confidence (1)

docs/csharp/language-reference/compiler-messages/overloaded-operator-errors.md:1

  • Missing the CS1554 error code in the front matter. Line 30 shows CS1554 in the title metadata but it's not included in the f1_keywords list (lines 4-39) or the helpviewer_keywords list (lines 40-75). This error code should be added to both lists to maintain consistency and ensure proper indexing.
---

@BillWagner BillWagner enabled auto-merge (squash) October 16, 2025 14:16
@BillWagner BillWagner merged commit 92bf244 into dotnet:main Oct 16, 2025
8 checks passed
@BillWagner BillWagner deleted the operator-issues branch October 16, 2025 14:24
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# 14-Errors and warnings]: New Feature - User defined compound operators

2 participants