dotnet/runtime
ReadOnlySequence<T>.TryGet() returns empty result
Ouverte
#27 769 ouverte le 30 oct. 2018
area-System.Memorybughelp wanted
Métriques du dépôt
- Stars
- (17 886 étoiles)
- Métriques de merge PR
- (Merge moyen 12j 11h) (661 PRs mergées en 30 j)
Description
When calling ReadOnlySequence<T>.TryGet(ref position, out memory) with a position of sequence.End or sequence.GetPosition(size) the result is true and memory is an empty slice. As this effectively is not returning a segment or byte, is should probably return false.
As per this comment from @pakrym, I'm raising as a seperate issue.