Skip to content
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

EnC: support async-iterator methods #32266

Closed
jcouv opened this issue Jan 9, 2019 · 2 comments
Closed

EnC: support async-iterator methods #32266

jcouv opened this issue Jan 9, 2019 · 2 comments

Comments

@jcouv
Copy link
Member

jcouv commented Jan 9, 2019

I noticed that there is some EnC for handling iterator and async methods, so there will likely be some handling for async-iterator methods too.

FYI @tmat @ivanbasov @jinujoseph
Let me know what you think in terms of scheduling. If this could be looked at in preview3, then I don't need to block this scenario.
Thanks

Async-streams umbrella: #24037

@jcouv
Copy link
Member Author

jcouv commented Jan 18, 2019

Here's the design document for async-iterator methods, await foreach and await using statements:
https://github.com/dotnet/roslyn/blob/master/docs/features/async-streams.md
It includes code snippets for the lowered form of different constructs.

I also have a draft article with more details: https://github.com/jcouv/roslyn/blob/blog-post/async-iterator.md

From discussion with @tmat, a few C# 8 features seem relatively straightforward:

  • async-iterators: when we build the sequence of awaits, to make sure that it is not changed, we should also include yield return and yield break, as well as new await constructs (await foreach, await using statement and declaration). Users are prevented from editing those.
  • await foreach: very much like a foreach. We need to confirm whether it adds any locals. Users are prevented from editing the declaration part of the await foreach once it is entered.
  • await using statement: very much like a using. We need to confirm whether it adds any locals. Users are prevented from editing the declaration part of the await foreach once it is entered.

The one that seems more trouble is the using declaration and await using declaration. I filed a separate issue for those (#32589).

@gafter gafter added this to the Compiler.Next milestone Jul 16, 2019
@tmat tmat modified the milestones: Compiler.Next, 16.3 Jul 31, 2019
@tmat
Copy link
Member

tmat commented Jul 31, 2019

This is now implemented.

@tmat tmat closed this as completed Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants