Skip to content

Commit

Permalink
Remove unnecessary cast
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub committed Jul 2, 2024
1 parent 20d0208 commit 1d9d5d9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ private static EqualityComparer<T> Create()

if (typeof(T) == typeof(string))
{
return Unsafe.As<EqualityComparer<T>>(new StringEqualityComparer());
return new StringEqualityComparer();

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build ios-arm64 Release AllSubsets_NativeAOT)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build tvos-arm64 Release AllSubsets_NativeAOT)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug NativeAOT)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-arm64 Release NativeAOT_Libraries)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT_Libraries)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Release NativeAOT)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-arm64 Release NativeAOT)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 checked CLR_Tools_Tests)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-arm Debug AllSubsets_CoreCLR_ReleaseRuntimeLibs)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm Debug AllSubsets_CoreCLR_ReleaseRuntimeLibs)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-arm checked CoreCLR_ReleaseLibraries)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm checked CoreCLR_ReleaseLibraries)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-arm64 Debug AllSubsets_CoreCLR_ReleaseRuntimeLibs)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug AllSubsets_CoreCLR)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug CoreCLR_Libraries)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug AllSubsets_CoreCLR)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / dotnet-linker-tests (Build osx-x64 release Runtime_Release)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-arm64 checked CoreCLR_ReleaseLibraries)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug CoreCLR_Libraries)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build freebsd-x64 Debug CoreCLR)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Release NativeAOT)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Libraries_CheckedCoreCLR)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / dotnet-linker-tests (Build linux-x64 release Runtime_Release)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug Libraries_CheckedCoreCLR)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Libraries_CheckedCoreCLR)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 checked CoreCLR_ReleaseLibraries)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-arm64 Debug AllSubsets_CoreCLR)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / dotnet-linker-tests

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / dotnet-linker-tests

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug CoreCLR_Libraries)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Libraries_CheckedCoreCLR)

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'

Check failure on line 29 in src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs

View check run for this annotation

Azure Pipelines / runtime

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs#L29

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.NativeAot.cs(29,24): error CS0029: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot implicitly convert type 'System.Collections.Generic.StringEqualityComparer' to 'System.Collections.Generic.EqualityComparer<T>'
}

if (SupportsGenericIEquatableInterfaces)
{
return Unsafe.As<EqualityComparer<T>>(EqualityComparerHelpers.GetComparer(typeof(T).TypeHandle));
}

return new ObjectEqualityComparer<T>();
}

Expand Down

0 comments on commit 1d9d5d9

Please sign in to comment.