We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e2bc17 commit fb8c77fCopy full SHA for fb8c77f
src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/CollectionsMarshal.cs
@@ -34,7 +34,8 @@ public static Span<T> AsSpan<T>(List<T>? list)
34
ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported();
35
}
36
37
- Debug.Assert(typeof(T[]) == list._items.GetType(), "Implementation depends on List<T> always using a T[] and not U[] where U : T.");
+ // Commented out to workaround https://github.com/dotnet/runtime/issues/96876
38
+ // Debug.Assert(typeof(T[]) == list._items.GetType(), "Implementation depends on List<T> always using a T[] and not U[] where U : T.");
39
span = new Span<T>(ref MemoryMarshal.GetArrayDataReference(items), size);
40
41
0 commit comments