diff --git a/src/Compilers/Core/Portable/InternalUtilities/SetWithInsertionOrder.cs b/src/Compilers/Core/Portable/InternalUtilities/SetWithInsertionOrder.cs index ea6f522113ebb45eb44202a22001011ead7f2c84..6f9ebf5ff533650d9dbc545819dca84d490ba906 100644 --- a/src/Compilers/Core/Portable/InternalUtilities/SetWithInsertionOrder.cs +++ b/src/Compilers/Core/Portable/InternalUtilities/SetWithInsertionOrder.cs @@ -96,7 +96,6 @@ public IEnumerator GetEnumerator() public ImmutableArray AsImmutable() => _elements.ToImmutableArrayOrEmpty(); - [MaybeNull] - public T this[int i] => _elements is null ? default : _elements[i]; + public T this[int i] => _elements![i]; } }