draconware-dev / SpanExtensions.Net

SpanExtensions.Net aims to make ReadOnlySpan<T> and Span<T> more accessible and overall better integrated into the .Net Ecosystem, by providing alternatives for many missing Extension Methods for Span<T>, ranging from string.Split() over Enumerable.Skip() and Enumerable.Take() to an improved ReadOnlySpan<T>.IndexOf().
MIT License
17 stars 5 forks source link

Ambiguous call between ReadOnlySpanExtensions and SpanExtensions #6

Closed Guiorgy closed 5 months ago

Guiorgy commented 5 months ago

Describe the bug
The extension methods in SpanExtensions and ReadOnlySpanExtensions have the exact same signature, which causes a CS0121 error, for example: Error CS0121 The call is ambiguous between the following methods or properties: 'ReadOnlySpanExtensions.Split<T>(ReadOnlySpan<T>, T)' and 'SpanExtensions.Split<T>(ReadOnlySpan<T>, T)'

I am assuming the methods inside SpanExtensions were meant to accept Span<T> instead of ReadOnlySpan<T>?

Version
1.2.0

Additional context
I'd recommend having unit tests to catch such problems.

dragon7307 commented 5 months ago

Hey, Thanks for bringing this to my attention, I appreciate the support.
I will definitely implement various testing mechanisms, as time goes on, however I have not yet found the time to do so.
This bug is fixed in the latest patch Version 1.2.1 and the previous version that are affected will be deprecated!!