Skip to content

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

@333fred

Description

@333fred

Relax requirement that type be enumerable to participate in collection expressions

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions