Remove unnecessary !s for [DoesNotReturn] (dotnet/coreclr#26350)
authorNext Turn <45985406+NextTurn@users.noreply.github.com>
Sat, 24 Aug 2019 13:32:02 +0000 (21:32 +0800)
committerStephen Toub <stoub@microsoft.com>
Sat, 24 Aug 2019 13:32:02 +0000 (09:32 -0400)
Commit migrated from https://github.com/dotnet/coreclr/commit/850529a98b32be66bdec5a54a2ef684207d918f2

src/libraries/System.Private.CoreLib/src/System/Array.cs
src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs

index d6daceb..0ceeec3 100644 (file)
@@ -770,7 +770,7 @@ namespace System
             int endIndex = startIndex + count;
             for (int i = startIndex; i < endIndex; i++)
             {
-                if (match!(array[i]))
+                if (match(array[i]))
                     return i;
             }
             return -1;
index 4e3ea63..d72f6f4 100644 (file)
@@ -430,7 +430,7 @@ namespace System.Collections.Generic
 
             for (int i = 0; i < _size; i++)
             {
-                if (match!(_items[i]))
+                if (match(_items[i]))
                 {
                     return _items[i];
                 }
@@ -482,7 +482,7 @@ namespace System.Collections.Generic
             int endIndex = startIndex + count;
             for (int i = startIndex; i < endIndex; i++)
             {
-                if (match!(_items[i])) return i;
+                if (match(_items[i])) return i;
             }
             return -1;
         }
@@ -497,7 +497,7 @@ namespace System.Collections.Generic
 
             for (int i = _size - 1; i >= 0; i--)
             {
-                if (match!(_items[i]))
+                if (match(_items[i]))
                 {
                     return _items[i];
                 }
@@ -567,7 +567,7 @@ namespace System.Collections.Generic
                 {
                     break;
                 }
-                action!(_items[i]);
+                action(_items[i]);
             }
 
             if (version != _version)
@@ -875,7 +875,7 @@ namespace System.Collections.Generic
             while (current < _size)
             {
                 // Find the first item which needs to be kept.
-                while (current < _size && match!(_items[current])) current++;
+                while (current < _size && match(_items[current])) current++;
 
                 if (current < _size)
                 {
@@ -1073,7 +1073,7 @@ namespace System.Collections.Generic
 
             for (int i = 0; i < _size; i++)
             {
-                if (!match!(_items[i]))
+                if (!match(_items[i]))
                 {
                     return false;
                 }