Skip to content

Commit

Permalink
Clarify generic case
Browse files Browse the repository at this point in the history
  • Loading branch information
jcouv committed Jan 31, 2024
1 parent a7e6bd2 commit dc84f02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proposals/csharp-12.0/collection-expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ For the *create method*:
Determination of the *element type*:

* If the collection type has an [*iteration type*](https://github.com/dotnet/csharpstandard/blob/standard-v6/standard/statements.md#1295-the-foreach-statement) (with above restriction) then the *element type* is the *iteration type*.
* Otherwise, if there is a single *create method* then the *element type* is `E` given by the method's only parameter (of type `System.ReadOnlySpan<E>`).
* Otherwise, if there is a single non-generic *create method* then the *element type* is `E` given by the method's only parameter (of type `System.ReadOnlySpan<E>`).

An error is reported if the `[CollectionBuilder]` attribute does not refer to an invocable method with the expected signature.

Expand Down

0 comments on commit dc84f02

Please sign in to comment.