dotnet / dotnet/docs

Document extension receiver and scoped-modifier ordering diagnostics

Closed
#55,922 0 comments 0 reactions 1 assignee Claimed by @BillWagner View on GitHub
:checkered_flag: Release: .NET 11 :pushpin: seQUESTered csharp-diagnostics/subsvc dotnet-csharp/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

Three related diagnostics are acknowledged only in the catch-all article and need real homes: `CS9347` (static members can't access an extension parameter's value), `CS9349` (`scoped` can't follow `in`/`out`/`ref`/`readonly`), and `CS9350` (a modifier can't immediately follow `scoped`). Together they explain declaration-shape rules for extension members and scoped/ref-style modifiers.

Document `CS9347` in `extension-declarations.md`, keeping examples narrowly focused on extension receiver/value semantics. Document `CS9349` and `CS9350` together in `ref-modifiers-errors.md` so modifier-ordering rules are explained once rather than split across two entries. Move all three out of catch-all-only status. See [Roslyn error codes](https://github.com/dotnet/roslyn/blob/main/src/Compilers/CSharp/Portable/Errors/ErrorCode.cs#L2448-L2452) for exact wording.

---
[Associated WorkItem - 632363](https://dev.azure.com/msft-skilling/Content/_workitems/edit/632363)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.