dotnet / csharplang

The official repo for the design of the C# programming language
10.95k stars 999 forks source link

Collection expressions: require Add method callable with a single argument for class and struct types that do not use [CollectionBuilder] #8022

Closed cston closed 1 month ago

cston commented 1 month ago

Previously, collection expression conversion required an Add method callable with a single argument of the iteration type if the collection expression has any elements. This is relaxed to an Add method callable with a single argument, without a requirement on the argument type.

AlekseyTs commented 1 month ago

Done with review pass (commit 1)