-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collection expressions: add spreads section #7664
base: main
Are you sure you want to change the base?
Conversation
|
||
The `GetEnumerator` method identified in the compile-time processing may be an extension method. | ||
|
||
The `Current` property identified in the compile-time processing may be *ref returning*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need language talking about when teh expression that is being spread is evaluated, versus when teh values are enumerated, and what guarantees there are (or are not) around that? (or does that already exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order of evaluation should be covered in the Construction section that follows this one.
@@ -129,7 +129,7 @@ The following implicit *collection expression conversions* exist from a collecti | |||
In the cases above, a collection expression *element* `Ei` is considered to have an *implicit conversion* to *type* `T` if: | |||
|
|||
* `Ei` is an *expression element* and there is an implicit conversion from `Ei` to `T`. | |||
* `Ei` is a *spread element* `Si` and there is an implicit conversion from the *iteration type* of `Si` to `T`. | |||
* `Ei` is a *spread element* and there is an implicit conversion from the *iteration type* of the spread element *collection* to `T`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term 'collection' surprises me a bit since any enumerable can be spread, and not all enumerables are collections.
No description provided.