Using Microsoft.Net.Compilers.Toolset v4.3.0-1.22206.2 or later, attempt to compile:
class C
{
static void M(ReadOnlySpan<char> x, ReadOnlySpan<byte> y) { }
static void M(ReadOnlySpan<char> x, ReadOnlySpan<char> y) { }
static void T() => M("test", "string");
}
Expected behavior:
Everything succeeds and the M(ROSpan<char>, ROSpan<char>) overload is called
Actual behavior:
CS0121: The call is ambiguous between the following methods or properties: 'C.M(ReadOnlySpan<char>, ReadOnlySpan<byte>)' and 'C.M(ReadOnlySpan<char>, ReadOnlySpan<char>)'
This is a breaking change and impacts System.Security.Cryptography.RSAWrapper.ImportFromEncryptedPem: dotnet/runtime#67440 (comment)
Using
Microsoft.Net.Compilers.Toolsetv4.3.0-1.22206.2or later, attempt to compile:Expected behavior:
Everything succeeds and the
M(ROSpan<char>, ROSpan<char>)overload is calledActual behavior:
CS0121: The call is ambiguous between the following methods or properties: 'C.M(ReadOnlySpan<char>, ReadOnlySpan<byte>)' and 'C.M(ReadOnlySpan<char>, ReadOnlySpan<char>)'This is a breaking change and impacts
System.Security.Cryptography.RSAWrapper.ImportFromEncryptedPem: dotnet/runtime#67440 (comment)