csharplang icon indicating copy to clipboard operation
csharplang copied to clipboard

[Proposal]: Relax requirement that type be enumerable to participate in collection expressions

Open 333fred opened this issue 11 months ago • 0 comments

Relax requirement that type be enumerable to participate in collection expressions

  • Specification: In the discussion
  • Discussion: https://github.com/dotnet/csharplang/discussions/9008

Summary

It is presently not possible to declare a collection type that doesn't implement some IEnumerable interface. We should consider allowing types marked with [CollectionBuilder(...)] to not be enumerable (and thus not have an iterator type).

Design meetings

https://github.com/dotnet/csharplang/blob/main/meetings/2024/LDM-2024-01-31.md#relax-enumerable-requirement-for-collection-expressions

333fred avatar Jan 06 '25 22:01 333fred