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

Defining an empty enumerator is broken #1

Open
CatoLeanTruetschel opened this issue Jun 21, 2018 · 0 comments
Open

Defining an empty enumerator is broken #1

CatoLeanTruetschel opened this issue Jun 21, 2018 · 0 comments

Comments

@CatoLeanTruetschel
Copy link

CatoLeanTruetschel commented Jun 21, 2018

Defining an empty enumerator

private static async AsyncEnumerator<int> GetEmptyEnumerator()
{
    var yield = await AsyncEnumerator<int>.Capture();

    return yield.Break();
}

yields the enumerators MoveNext method to return true on the first access while the Current property contains the default value of the type iterated (null for reference types).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant