Closed
Description
I'm using coverlet.msbuild v3.1.0 (and tried also with the current nightly build) and there is an uncovered statement reported.
I tried to reproduce it but I didn't managed to get an reproduction.
Any ideas what the problem could be and how I can provide an reproduction?
public class AsyncForeachReproduction
{
private static async IAsyncEnumerable<int> RangeAsync(int start, int count)
{
for (int i = 0; i < count; i++)
{
await Task.Delay(i);
yield return start + i;
}
}
public async Task Execute()
{
await foreach (var a in RangeAsync(1, 5))
{
Console.WriteLine(a);
await Task.CompletedTask;
}
await Task.CompletedTask;
}
}