ReadOnlySpan GetReference returns ref instead of ref readonly (#15548)
authorAhson Khan <ahkha@microsoft.com>
Sat, 16 Dec 2017 01:45:18 +0000 (17:45 -0800)
committerJan Kotas <jkotas@microsoft.com>
Sat, 16 Dec 2017 01:45:18 +0000 (20:45 -0500)
src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.cs

index b023022..2651df5 100644 (file)
@@ -28,7 +28,7 @@ namespace System.Runtime.InteropServices
 
         public static ref T GetReference<T>(Span<T> span) => ref span._pointer.Value;
 
-        public static ref readonly T GetReference<T>(ReadOnlySpan<T> span) => ref span._pointer.Value;
+        public static ref T GetReference<T>(ReadOnlySpan<T> span) => ref span._pointer.Value;
 
         public static bool TryGetArray<T>(ReadOnlyMemory<T> readOnlyMemory, out ArraySegment<T> arraySegment)
         {