From 3c958f345832f649889973e84bdac2f215a0d0e3 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Fri, 15 Dec 2017 17:45:18 -0800 Subject: [PATCH] ReadOnlySpan GetReference returns ref instead of ref readonly (#15548) --- src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.cs b/src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.cs index b023022..2651df5 100644 --- a/src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.cs +++ b/src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.cs @@ -28,7 +28,7 @@ namespace System.Runtime.InteropServices public static ref T GetReference(Span span) => ref span._pointer.Value; - public static ref readonly T GetReference(ReadOnlySpan span) => ref span._pointer.Value; + public static ref T GetReference(ReadOnlySpan span) => ref span._pointer.Value; public static bool TryGetArray(ReadOnlyMemory readOnlyMemory, out ArraySegment arraySegment) { -- 2.7.4