Skip to content

[Version 14.0] Feature support for extension members - #1833

Draft
RexJaeschke wants to merge 8 commits into
draft-v14from
v14-extension-members
Draft

RexJaeschke wants to merge 8 commits into
draft-v14from
v14-extension-members

Conversation

@RexJaeschke

Copy link
Copy Markdown
Contributor

This is Rex's adaptation of the corresponding MS proposal #1 and MS proposal #2.

  1. Extension indexer support will be added in V15.
  2. Although the MS spec uses the term “receiver parameter” and related grammar rule receiver_parameter, I renamed that as “extension receiver parameter” and extension_ receiver_parameter, respectively. Here’s why:
  • All the other extension-related grammar rule names—extension_declaration, extension_body, and extension_member_declaration—have the prefix “extension”.
  • We also use the terms extension block and extension member.
  • Related compiler error messages typically use the prefix “extension”.
  • “receiver” is already used in unrelated contexts in the spec.
  1. The following sections in the MS proposal appear to be about implementation detail. As such, nothing from them was include in this PR: Lowering and Metadata for declarations.
  2. I did not add anything about the implementation machinery for making the expansion block a nested type.
  3. The extension operators subclause mentions the type MethodInfo. See this V11 feature PR comment re this type.

@RexJaeschke RexJaeschke added this to the C# 14 milestone Oct 14, 2026
@RexJaeschke RexJaeschke added type: feature This issue describes a new feature Review: pending Proposal is available for review labels Oct 14, 2026
@RexJaeschke
RexJaeschke marked this pull request as draft October 14, 2026 17:14
@BillWagner
BillWagner force-pushed the v14-extension-members branch from 9e20e30 to b891f43 Compare October 16, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review: pending Proposal is available for review type: feature This issue describes a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant