-
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
Add spec for extension GetEnumerator #3576
Conversation
/cc @YairHalberstadt |
Should there be a section about async foreach? |
Probably, will add.
It doesn't need to be explicit. Overload resolution with a single argument will find methods with default parameters. |
I would expect it to be explicit for instance GetEnumerator then. |
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.
😷
@YairHalberstadt thanks to some sleuthing from @gafter, there's yet another spec violation for compat that we kept: https://github.com/dotnet/roslyn/blob/master/src/Compilers/CSharp/Portable/Binder/ForEachLoopBinder.cs#L1006-L1016. It absolutely should be including those parameters, and it does for async enumerable. |
Note: the spec I'm referring to in the update is https://github.com/dotnet/roslyn/blob/master/docs/features/async-streams.md, not the one checked into csharplang. @jcouv has taken a work item to update the one in this repo, which is out of date in several aspects (including whether extension methods are permitted). |
Added the spec for extension GetEnumerator. The only change from #3194 was the additional line about the refkind in overload resolution.