Skip to content

Conversation

@BillWagner
Copy link
Member

@BillWagner BillWagner commented Jan 29, 2026

Fixes #49601

There was an existing file for this topic. In addition, Copilot found several other good candidates for addition to this file, resulting in new consolidation opportunities.


Internal previews

📄 File 🔗 Preview link
docs/csharp/language-reference/compiler-messages/generic-type-parameters-errors.md Resolve errors and warnings related to generic type parameters and generic type arguments
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 Coming in C# 15

@BillWagner BillWagner marked this pull request as ready for review January 30, 2026 16:23
@BillWagner BillWagner requested a review from a team as a code owner January 30, 2026 16:23
Copilot AI review requested due to automatic review settings January 30, 2026 16:23
Copy link
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

This pull request consolidates C# compiler errors and warnings related to generic type parameters into a single comprehensive documentation file (generic-type-parameters-errors.md). The changes address issue #49601, which requested documentation for CS9011 and CS9012 errors introduced in C# 11, along with consolidation of other generic-related errors.

Changes:

  • Creates a comprehensive guide covering 32 error codes related to generic type parameters, constraints, and type arguments
  • Removes 11 individual error documentation files (9 from /misc/, 2 from /compiler-messages/)
  • Adds redirects for all deleted files to the new consolidated documentation
  • Updates the TOC to reflect the consolidation
  • Removes documented error codes from the "sorry-we-don't-have-specifics" stub file

Reviewed changes

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

Show a summary per file
File Description
docs/csharp/language-reference/compiler-messages/generic-type-parameters-errors.md Main consolidated documentation covering 32 error codes organized into 7 thematic sections with examples
docs/csharp/misc/cs0401.md Deleted - moved to consolidated file
docs/csharp/misc/cs0405.md Deleted - moved to consolidated file
docs/csharp/misc/cs0449.md Deleted - moved to consolidated file
docs/csharp/misc/cs0450.md Deleted - moved to consolidated file
docs/csharp/misc/cs0451.md Deleted - moved to consolidated file
docs/csharp/misc/cs0454.md Deleted - moved to consolidated file
docs/csharp/misc/cs0455.md Deleted - moved to consolidated file
docs/csharp/misc/cs0706.md Deleted - moved to consolidated file
docs/csharp/misc/cs0717.md Deleted - moved to consolidated file
docs/csharp/language-reference/compiler-messages/cs0702.md Deleted - moved to consolidated file
docs/csharp/language-reference/compiler-messages/cs0703.md Deleted - moved to consolidated file
.openpublishing.redirection.csharp.json Added 11 redirects for deleted files to consolidated documentation
docs/csharp/language-reference/toc.yml Updated to remove individual error entries and consolidate into single entry with displayName listing all error codes
docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md Removed 4 error codes (CS1961, CS7002, CS8322, CS9011, CS9012) now documented

BillWagner and others added 2 commits January 30, 2026 12:55
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
@BillWagner BillWagner enabled auto-merge (squash) January 30, 2026 18:15
@BillWagner BillWagner merged commit e0f1cce into dotnet:main Jan 30, 2026
9 checks passed
@BillWagner BillWagner deleted the generic-declaration-errors branch January 30, 2026 18:18
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.

Add C# errors and warnings for generic constraints

2 participants