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

Async-streams: Add test for ref struct enumerator #32794

Open
jcouv opened this issue Jan 25, 2019 · 0 comments
Open

Async-streams: Add test for ref struct enumerator #32794

jcouv opened this issue Jan 25, 2019 · 0 comments
Assignees
Labels
Area-Compilers New Feature - Async Streams Async Streams Test Test failures in roslyn-CI
Milestone

Comments

@jcouv
Copy link
Member

jcouv commented Jan 25, 2019

Should be disallowed in await foreach, as ref struct variables aren't allowed in async methods.

class C
{
    public Enumerator GetAsyncEnumerator()
    {
        return new Enumerator();
    }

    public ref struct Enumerator
    {
        public async Task<bool> MoveNextAsync() => true;
        public int Current => throw null;
        public Task DisposeAsync() { }
    }
}
@jcouv jcouv added Area-Compilers Test Test failures in roslyn-CI New Feature - Async Streams Async Streams labels Jan 25, 2019
@jcouv jcouv self-assigned this Jan 25, 2019
@gafter gafter added this to the Compiler.Next milestone Jul 16, 2019
@jaredpar jaredpar modified the milestones: Compiler.Next, Backlog Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers New Feature - Async Streams Async Streams Test Test failures in roslyn-CI
Projects
None yet
Development

No branches or pull requests

3 participants