Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify RuntimeHelpers.GetSubArray (#66011)
The special casing of co-variant arrays was added in the original safe implementation to avoid exceptions from AsSpan (dotnet/coreclr#22331 (comment)). ArrayTypeMismatchException is no longer a concern with the new unsafe implementation. There is a subtle behavior change in the actual type for co-variant arrays of reference types. However, the new behavior matches Array.Resize and it is very unlikely for any code out there to depend on this co-variant arrays corner case.
- Loading branch information