-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Create combined diagnostic page for property syntax #50563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create combined diagnostic page for property syntax #50563
Conversation
There was a problem hiding this 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 property-related compiler errors and warnings into a single comprehensive diagnostic page, improving documentation discoverability and maintainability by bringing together scattered error documentation from individual files and the misc folder.
Key changes:
- Creates a new consolidated page
property-declaration-errors.mdcovering 41 error codes related to property declarations, including readonly properties, auto-implemented properties, field-backed properties, required members, ref-returning properties, and property initializers - Removes field-backed property documentation from
partial-declarations.md(CS9258, CS9263, CS9264, CS9266, CS9273) since these errors are more closely related to property declarations than partial declarations - Updates TOC and redirection mappings to ensure all deleted error pages redirect to the new consolidated page
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
docs/csharp/language-reference/compiler-messages/property-declaration-errors.md |
New consolidated documentation covering 41 property-related compiler errors and warnings with detailed explanations and resolution steps |
docs/csharp/language-reference/compiler-messages/partial-declarations.md |
Removes field-backed property section (moved to property-declaration-errors.md) and updates error code lists |
docs/csharp/language-reference/toc.yml |
Adds new property declarations entry with displayName listing all covered error codes and moves field-backed property codes from partial declarations section |
docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md |
Removes 22 error codes that now have proper documentation in the consolidated page |
.openpublishing.redirection.csharp.json |
Adds redirects for 8 deleted individual error pages (cs0200.md, cs0545.md, cs0571.md, cs0840.md, cs1014.md, cs1043.md, cs8145.md, cs9036.md) |
docs/csharp/misc/cs0200.md, cs1014.md, cs1043.md |
Deleted individual error pages now consolidated into property-declaration-errors.md |
docs/csharp/language-reference/compiler-messages/cs0545.md, cs0571.md, cs0840.md, cs8145.md, cs9036.md |
Deleted individual error pages now consolidated into property-declaration-errors.md |
docs/csharp/language-reference/compiler-messages/snippets/partial-declarations/ |
Removed unused snippet files (CS0759Examples.cs and project file) as the examples were replaced with consolidated guidance |
.github/prompts/error-consolidation.md |
Updated prompt configuration to target property declaration errors |
docs/csharp/language-reference/compiler-messages/property-declaration-errors.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/compiler-messages/property-declaration-errors.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/compiler-messages/property-declaration-errors.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fixes #49593
Create a single page for all errors and warnings related to properties.
Pull in the section on field-based properties from the partial types diagnostic page.
While in these files, perform a general edit pass.
Internal previews
partialtype andpartialmember declarations