Document C# 8 misc diagnostics#54812
Open
BillWagner wants to merge 6 commits into
Open
Conversation
Consolidate the remaining C# 8 miscellaneous compiler diagnostics into themed compiler-message articles and remove them from the catch-all. New consolidated articles: - static-local-function-errors.md (CS8421) - index-range-errors.md (CS8428, CS8429) - parsing-errors.md (CS8635, CS8641) — scoped to parser/lexer-stage errors - readonly-member-errors.md (CS8656, CS8662) Added to existing articles: - attribute-usage-errors.md: CS8423 - interface-implementation-errors.md: CS8646 - nullable-warnings.md: CS8650, CS8651, CS8669 Removed all 12 codes from the sorry-we-don-t-have-specifics catch-all and added TOC entries for the new articles. Messages verified against Roslyn source. Note: the issue listed CS8556, which does not exist; the correct readonly-member warning is CS8656. Closes dotnet#54660 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5d7745fb-b209-4027-a20d-793310218421
Contributor
There was a problem hiding this comment.
Pull request overview
This PR documents the remaining C# 8 miscellaneous compiler diagnostics from #54660 by moving each diagnostic into a themed, consolidated compiler-message article, updating related existing articles, and removing the diagnostics from the “sorry-we-don’t-have-specifics” catch-all list.
Changes:
- Added four new consolidated compiler-message articles covering CS8421, CS8428/CS8429, CS8635/CS8641, and CS8656/CS8662.
- Updated existing compiler-message articles to include CS8423, CS8646, CS8650/CS8651, and CS8669.
- Updated the C# language reference TOC and removed the 12 codes from the catch-all page’s
f1_keywordslist.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md | Removes C# 8 misc diagnostic codes from the catch-all f1_keywords list. |
| docs/csharp/language-reference/toc.yml | Adds TOC entries for the new consolidated articles and updates displayName keyword lists to include moved codes. |
| docs/csharp/language-reference/compiler-messages/static-local-function-errors.md | New consolidated article for CS8421 (static local functions). |
| docs/csharp/language-reference/compiler-messages/index-range-errors.md | New consolidated article for CS8428/CS8429 (index and range expressions). |
| docs/csharp/language-reference/compiler-messages/parsing-errors.md | New consolidated article for CS8635/CS8641 (parser/lexer-stage errors). |
| docs/csharp/language-reference/compiler-messages/readonly-member-errors.md | New consolidated article for CS8656/CS8662 (readonly struct member diagnostics). |
| docs/csharp/language-reference/compiler-messages/nullable-warnings.md | Adds CS8650/CS8651 and CS8669 content and updates keyword metadata and date. |
| docs/csharp/language-reference/compiler-messages/interface-implementation-errors.md | Adds CS8646 coverage and updates keyword metadata and date. |
| docs/csharp/language-reference/compiler-messages/attribute-usage-errors.md | Adds CS8423 coverage and updates keyword metadata and date. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Follow-up to the C# 8 misc diagnostics work: expand three of the new consolidated articles to cover their full themes (conservative scope — bring in undocumented/standalone codes only; cross-reference codes that already live in other consolidated articles). - static-local-function-errors.md -> local-function-errors.md: all local-function diagnostics. Adds CS8108, CS8112, CS8321, and merges standalone CS8422 (with redirect). - index-range-errors.md -> indexer-access-errors.md: indexer and element access. Adds CS0021, CS0154, CS0271, CS0272, CS0856, CS0857, CS1545, and merges standalone CS1546 (with redirect). - readonly-member-errors.md -> readonly-struct-errors.md: readonly struct declarations and members. Adds CS8340, CS8342. Updates TOC entries and titles for the renames, removes the added codes from the catch-all, and cross-references related diagnostics that remain in their existing articles. Messages verified against Roslyn source. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5d7745fb-b209-4027-a20d-793310218421
- Fix "surpress" -> "suppress" typo in nullable-warnings.md. - Use sentence case for the readonly structs and members TOC entry. The ai-usage disclosure on nullable-warnings.md was already added in a prior autofix commit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5d7745fb-b209-4027-a20d-793310218421
BillWagner
commented
Jul 16, 2026
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.
Summary
Documents the remaining C# 8 miscellaneous compiler diagnostics from #54660 by folding each into a themed consolidated compiler-message article and removing it from the
sorry-we-don-t-have-specificscatch-all.New consolidated articles
static-local-function-errors.mdindex-range-errors.mdparsing-errors.md(scoped to parser/lexer-stage errors)readonly-member-errors.mdAdded to existing articles
attribute-usage-errors.mdinterface-implementation-errors.mdnullable-warnings.mdNotes
WRN_ImplicitCopyInReadOnlyMember).nullable-warnings.md.is/as) placed innullable-warnings.mdsince the rule concerns nullable-reference-type annotations.parsing-errors.mdis deliberately scoped to parser/lexer-stage diagnostics only (not a general "syntax errors" catch-all).Closes #54660
Follow-up: broadened three articles to full themes
Three of the new articles were expanded to cover their complete themes (conservative scope — only undocumented/standalone codes brought in; codes already living in other consolidated articles are cross-referenced in prose):
local-function-errors.md(was static-local-function-errors)indexer-access-errors.md(was index-range-errors)readonly-struct-errors.md(was readonly-member-errors)*CS8422 and CS1546 were standalone articles, now merged with redirects.
Internal previews