Add diagnostics for init only properties#53520
Open
BillWagner wants to merge 7 commits intodotnet:mainfrom
Open
Add diagnostics for init only properties#53520BillWagner wants to merge 7 commits intodotnet:mainfrom
BillWagner wants to merge 7 commits intodotnet:mainfrom
Conversation
Make sure the error messages in the doc match the roslyn source.
Review and do a final copyedit.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses missing documentation for C# init-only property diagnostics by consolidating several compiler error pages into the existing property declaration diagnostics article, and updating routing/navigation so the affected error codes land on the consolidated guidance instead of the generic “no specifics” page.
Changes:
- Add corrective guidance for init-only property diagnostics (CS8852, CS8853, CS8855, CS8856, and CS8903) to the consolidated property declaration errors article.
- Consolidate multiple legacy per-error pages into the consolidated article, remove the old pages, and add redirects for the removed URLs.
- Update the C# language reference TOC and the “no specifics” page keywords to point users to the consolidated content.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md | Removes f1 keywords for diagnostics now covered by the consolidated property-declaration article. |
| docs/csharp/misc/cs1715.md | Removes legacy per-error page (now redirected to consolidated guidance). |
| docs/csharp/misc/cs0610.md | Removes legacy per-error page (now redirected to consolidated guidance). |
| docs/csharp/misc/cs0548.md | Removes legacy per-error page (now redirected to consolidated guidance). |
| docs/csharp/misc/cs0547.md | Removes legacy per-error page (now redirected to consolidated guidance). |
| docs/csharp/misc/cs0546.md | Removes legacy per-error page (now redirected to consolidated guidance). |
| docs/csharp/misc/cs0544.md | Removes legacy per-error page (now redirected to consolidated guidance). |
| docs/csharp/misc/cs0442.md | Removes legacy per-error page (now redirected to consolidated guidance). |
| docs/csharp/misc/cs0276.md | Removes legacy per-error page (now redirected to consolidated guidance). |
| docs/csharp/misc/cs0275.md | Removes legacy per-error page (now redirected to consolidated guidance). |
| docs/csharp/misc/cs0274.md | Removes legacy per-error page (now redirected to consolidated guidance). |
| docs/csharp/misc/cs0273.md | Removes legacy per-error page (now redirected to consolidated guidance). |
| docs/csharp/language-reference/toc.yml | Updates TOC keywords and removes entries for removed per-error pages. |
| docs/csharp/language-reference/compiler-messages/property-declaration-errors.md | Expands consolidated guidance (including init-only diagnostics) and adds keywords for routing. |
| .openpublishing.redirection.csharp.json | Adds redirects from removed per-error pages to the consolidated property-declaration article. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Reword one recommendation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #52835
Add corrective information for diagnostics related to init only properties.
In addition, do another search for consolidation opportunities.
Internal previews