csharplang
csharplang copied to clipboard
[Proposal]: Relax requirement that type be enumerable to participate in collection expressions
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