Skip to content

[Version 13.0] Feature support for params Collections - #1783

Draft
RexJaeschke wants to merge 9 commits into
draft-v13from
v13-params-Collections
Draft

[Version 13.0] Feature support for params Collections#1783
RexJaeschke wants to merge 9 commits into
draft-v13from
v13-params-Collections

Conversation

@RexJaeschke

Copy link
Copy Markdown
Contributor

This is Rex's adaptation of the corresponding MS proposal.

Notes

  1. The proposal section “Better function member” contains 3 pages of rationale, none of which are included in this PR.
  2. As dynamic binding is implementation-defined, the proposal section “Dynamic Binding” is not included in this PR.
  3. 12.6.2.3 Run-time evaluation of argument lists states, “The expressions of an argument list are always evaluated in textual order.” The proposal section “Order of evaluation with non-array collections in non-trivial scenarios” contains 4 pages of examples, none of which are included in this PR. However, it might be necessary to say something, as it appears the behavior with params non-array collection differs from that of a params array.
  4. The proposal section “Ref safety” states, “Params parameters are implicitly scoped when their type is a ref struct. UnscopedRefAttribute can be used to override that.” Presumably that was added to the spec when support for scoped was added in V11, and nothing specific to parameter collections need be added in V13. See the proposal section “Open questions/[Resolved] Implicitly scoped params” and section “Open questions/[Resolved] Consider enforcing scoped or params across overrides,” neither of which has resulted in text in this PR.
  5. The proposal section “Open questions/ [Resolved] Should presence of required members prevent declaration of params parameter?” has a recommendation. However, I did not add any text re that in this PR.
  6. The spec in “Better function member” contains the following text, which is not mentioned in the MS proposal rewrite of this subclause; should this text be retained or removed?
  • for each argument, the implicit conversion from Eᵥ to Pᵥ is not an anonymous function type conversion, and

  • Mᵥ is a non-generic method or Mᵥ is a generic method with type parameters {X₁, X₂, ..., Xᵥ} and for each type parameter the type argument is inferred from an expression or from a type other than an anonymous function type, and

  • for at least one argument, the implicit conversion from Eᵥ to Qᵥ is an anonymous function type conversion, or Mₓ is a generic method with type parameters {Y₁, Y₂, ..., Yᵥ} and for at least one type parameter the type argument is inferred from an anonymous function type, or[

@RexJaeschke RexJaeschke added this to the C# 13 milestone Aug 18, 2026
@RexJaeschke RexJaeschke added type: feature This issue describes a new feature Review: pending Proposal is available for review labels Aug 18, 2026
@RexJaeschke
RexJaeschke marked this pull request as draft August 18, 2026 13:30
BillWagner added a commit that referenced this pull request Aug 18, 2026
…s collections

Source: #1783
Head SHA: b9ba15c

Apply params collections feature patch from PR #1783 to alpha-v13.
8 files modified: README.md, arrays.md, basic-concepts.md, classes.md,
delegates.md, expressions.md, interfaces.md, unsafe-code.md
BillWagner added a commit that referenced this pull request Aug 18, 2026
…e from feature patches

Applied patches inadvertently introduced trailing whitespace on three lines:

- Line 2393 (PR #1783): Removed double trailing space after IList<T> list item
- Line 4581 (PR #1776): Changed '> ' to '>' for blockquote blank line (matches repo convention)
- Line 4616 (PR #1776): Changed '> ' to '>' for blockquote blank line (matches repo convention)

Repo standard for blockquote blank lines is '>$' without trailing space (627 instances
in baseline vs 40 with space). This commit restores compliance.

Files: standard/classes.md (3 line fixes)
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