From: Stephen Toub Date: Fri, 28 Jun 2019 14:50:25 +0000 (-0400) Subject: Workaround potential compiler nullability bug X-Git-Tag: submit/tizen/20210909.063632~11031^2~1086 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06703f3d5112f4a1c95b3f69d556b50844a03804;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Workaround potential compiler nullability bug Commit migrated from https://github.com/dotnet/corefx/commit/5e3b0ae04986e9527eb51d3717ab96727c215c03 --- diff --git a/src/libraries/System.Memory/src/System/Buffers/ReadOnlySequence.cs b/src/libraries/System.Memory/src/System/Buffers/ReadOnlySequence.cs index c9f6d52..a9d6179 100644 --- a/src/libraries/System.Memory/src/System/Buffers/ReadOnlySequence.cs +++ b/src/libraries/System.Memory/src/System/Buffers/ReadOnlySequence.cs @@ -146,7 +146,9 @@ namespace System.Buffers /// public ReadOnlySequence(ReadOnlyMemory memory) { +#pragma warning disable CS8631 // TODO-NULLABLE: Unexpected compiler error: https://github.com/dotnet/corefx/pull/38983#issuecomment-506757237 if (MemoryMarshal.TryGetMemoryManager(memory, out MemoryManager? manager, out int index, out int length)) +#pragma warning restore CS8631 { _startObject = manager; _endObject = manager;