26 lines
614 B
C#
26 lines
614 B
C#
// Remember to use full name because adding new using directives change line numbers
|
|
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Coverlet.Core.Samples.Tests
|
|
{
|
|
public class GenericAsyncIterator<T>
|
|
{
|
|
public async Task<List<int>> Issue1383()
|
|
{
|
|
var sequence = await CreateSequenceAsync().ToListAsync();
|
|
return sequence;
|
|
}
|
|
|
|
|
|
public async IAsyncEnumerable<int> CreateSequenceAsync()
|
|
{
|
|
await Task.CompletedTask;
|
|
yield return 5;
|
|
yield return 2;
|
|
}
|
|
}
|
|
}
|