Skip to content

Add additional compiler diagnostics related to applying attributes#51739

Open
BillWagner wants to merge 9 commits intodotnet:mainfrom
BillWagner:generic-attribute-issues
Open

Add additional compiler diagnostics related to applying attributes#51739
BillWagner wants to merge 9 commits intodotnet:mainfrom
BillWagner:generic-attribute-issues

Conversation

@BillWagner BillWagner marked this pull request as ready for review February 13, 2026 20:32
@BillWagner BillWagner requested a review from a team as a code owner February 13, 2026 20:32
Copilot AI review requested due to automatic review settings February 13, 2026 20:32
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 PR addresses issue #51446 by consolidating multiple attribute-related compiler error diagnostics into a single comprehensive article. The changes move individual error documentation pages to a unified "Attribute declaration and usage" article, making it easier to find and understand related errors.

Changes:

  • Consolidates 23 attribute-related compiler errors (CS0181, CS0579, CS0592, CS0616, CS0647, CS0668, CS0735, CS0739, CS1608, CS1614, CS1618, CS1667, CS1689, CS8959-CS8963, CS8968, CS8970) into attribute-usage-errors.md
  • Adds new section for CallerArgumentExpression attribute errors (CS8959-CS8963) as requested in issue #51446
  • Includes generic attribute type errors (CS8968, CS8970) as requested in issue #51446
  • Creates redirects for all deleted individual error pages to the consolidated article

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/csharp/language-reference/compiler-messages/attribute-usage-errors.md Expanded with 23 additional error codes organized into 6 logical sections: Attribute arguments and parameters, Attribute class requirements, Attribute location context, Predefined attributes, Conditional attribute usage, and CallerArgumentExpression attribute usage
docs/csharp/language-reference/tokens/verbatim.md Updated CS1614 reference link to point to the new consolidated article with appropriate anchor
docs/csharp/language-reference/toc.yml Updated displayName to include all new error codes and removed individual TOC entries for deleted files
docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md Removed error codes that now have documentation
.openpublishing.redirection.csharp.json Added 13 redirects for deleted individual error pages
docs/csharp/language-reference/compiler-messages/cs0181.md Deleted (moved to consolidated article)
docs/csharp/language-reference/compiler-messages/cs0579.md Deleted (moved to consolidated article)
docs/csharp/language-reference/compiler-messages/cs0592.md Deleted (moved to consolidated article)
docs/csharp/language-reference/compiler-messages/cs0616.md Deleted (moved to consolidated article)
docs/csharp/language-reference/compiler-messages/cs1614.md Deleted (moved to consolidated article)
docs/csharp/misc/cs0647.md Deleted (moved to consolidated article)
docs/csharp/misc/cs0668.md Deleted (moved to consolidated article)
docs/csharp/misc/cs0735.md Deleted (moved to consolidated article)
docs/csharp/misc/cs0739.md Deleted (moved to consolidated article)
docs/csharp/misc/cs1608.md Deleted (moved to consolidated article)
docs/csharp/misc/cs1618.md Deleted (moved to consolidated article)
docs/csharp/misc/cs1667.md Deleted (moved to consolidated article)
docs/csharp/misc/cs1689.md Deleted (moved to consolidated article)

BillWagner and others added 2 commits February 13, 2026 16:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@BillWagner BillWagner requested a review from adegeo February 13, 2026 21:01
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# 10 diagnostics] Errors related to CallerArgumentExpressions, Generic attribute types

1 participant

Comments