[master] Update dependencies from dotnet/arcade (dotnet/corefx#38474)
authordotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Wed, 12 Jun 2019 17:41:32 +0000 (10:41 -0700)
committerSantiago Fernandez Madero <safern@microsoft.com>
Wed, 12 Jun 2019 17:41:32 +0000 (12:41 -0500)
* Update dependencies from https://github.com/dotnet/arcade build 20190611.2

- Microsoft.DotNet.XUnitExtensions - 2.4.1-beta.19311.2
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19311.2
- Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19311.2
- Microsoft.DotNet.ApiCompat - 1.0.0-beta.19311.2
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19311.2
- Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19311.2
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19311.2
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19311.2
- Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19311.2
- Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19311.2
- Microsoft.DotNet.GenAPI - 1.0.0-beta.19311.2
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19311.2
- Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19311.2
- Microsoft.DotNet.GenFacades - 1.0.0-beta.19311.2

* Update `where T : object` constraint to be `where T : notnull`

* Update several TODO-NULLABLE comments

Commit migrated from https://github.com/dotnet/corefx/commit/28efaabc4349d11a95f8f31eb932c84f207916ab

src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs
src/libraries/System.Collections/src/System/Collections/BitArray.cs
src/libraries/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs
src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs
src/libraries/System.Collections/src/System/Collections/Generic/SortedList.cs
src/libraries/System.Runtime/ref/System.Runtime.cs

index f6696c1..3729dc7 100644 (file)
@@ -32,7 +32,7 @@ namespace System.Collections.Concurrent
     /// </remarks>
     [DebuggerTypeProxy(typeof(IDictionaryDebugView<,>))]
     [DebuggerDisplay("Count = {Count}")]
-    public class ConcurrentDictionary<TKey, TValue> : IDictionary<TKey, TValue>, IDictionary, IReadOnlyDictionary<TKey, TValue> where TKey : object
+    public class ConcurrentDictionary<TKey, TValue> : IDictionary<TKey, TValue>, IDictionary, IReadOnlyDictionary<TKey, TValue> where TKey : notnull
     {
         /// <summary>
         /// Tables that hold the internal state of the ConcurrentDictionary
@@ -2063,7 +2063,7 @@ namespace System.Collections.Concurrent
                 get { return _enumerator.Current.Value; }
             }
 
-#pragma warning disable CS8612 // TODO-NULLABLE: Covariant return types (https://github.com/dotnet/roslyn/issues/23268)
+#pragma warning disable CS8612 // TODO-NULLABLE: Covariance in interfaces (https://github.com/dotnet/roslyn/issues/35227)
             public object Current
 #pragma warning restore CS8612
             {
index 3248dde..4591929 100644 (file)
@@ -781,7 +781,7 @@ namespace System.Collections
                 return false;
             }
 
-#pragma warning disable CS8612 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268
+#pragma warning disable CS8612 // TODO-NULLABLE: Covariance in interfaces (https://github.com/dotnet/roslyn/issues/35227)
             public virtual object Current
 #pragma warning restore CS8612
             {
index f21da16..ecf8b14 100644 (file)
@@ -9,13 +9,13 @@ namespace System.Collections.Generic
     public static class CollectionExtensions
     {
         [return: MaybeNull]
-        public static TValue GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key) where TKey : object
+        public static TValue GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key) where TKey : notnull
         {
             return dictionary.GetValueOrDefault(key, default(TValue)!); // TODO-NULLABLE: Remove ! when nullable attributes are respected
         }
 
         [return: MaybeNull]
-        public static TValue GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key, [AllowNull] TValue defaultValue) where TKey : object
+        public static TValue GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key, [AllowNull] TValue defaultValue) where TKey : notnull
         {
             if (dictionary == null)
             {
@@ -26,7 +26,7 @@ namespace System.Collections.Generic
             return dictionary.TryGetValue(key, out value) ? value : defaultValue;
         }
 
-        public static bool TryAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, TValue value) where TKey : object
+        public static bool TryAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, TValue value) where TKey : notnull
         {
             if (dictionary == null)
             {
@@ -42,7 +42,7 @@ namespace System.Collections.Generic
             return false;
         }
 
-        public static bool Remove<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, [MaybeNullWhen(false)] out TValue value) where TKey : object
+        public static bool Remove<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, [MaybeNullWhen(false)] out TValue value) where TKey : notnull
         {
             if (dictionary == null)
             {
index 36e01ee..324f152 100644 (file)
@@ -12,7 +12,7 @@ namespace System.Collections.Generic
     [DebuggerDisplay("Count = {Count}")]
     [Serializable]
     [System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
-    public class SortedDictionary<TKey, TValue> : IDictionary<TKey, TValue>, IDictionary, IReadOnlyDictionary<TKey, TValue> where TKey : object
+    public class SortedDictionary<TKey, TValue> : IDictionary<TKey, TValue>, IDictionary, IReadOnlyDictionary<TKey, TValue> where TKey : notnull
     {
         [NonSerialized]
         private KeyCollection? _keys;
index ce50e47..c56fa66 100644 (file)
@@ -53,7 +53,7 @@ namespace System.Collections.Generic
     [Serializable]
     [System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
     public class SortedList<TKey, TValue> :
-        IDictionary<TKey, TValue>, IDictionary, IReadOnlyDictionary<TKey, TValue> where TKey : object
+        IDictionary<TKey, TValue>, IDictionary, IReadOnlyDictionary<TKey, TValue> where TKey : notnull
     {
         private TKey[] keys; // Do not rename (binary serialization)
         private TValue[] values; // Do not rename (binary serialization)
index 3f653cd..444b569 100644 (file)
@@ -2915,7 +2915,7 @@ namespace System
         int System.IComparable.CompareTo(object? obj) { throw null; }
         public override string ToString() { throw null; }
     }
-    public partial class Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> : System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable, System.IComparable, System.Runtime.CompilerServices.ITuple where TRest : object
+    public partial class Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> : System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable, System.IComparable, System.Runtime.CompilerServices.ITuple where TRest : notnull
     {
         public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest) { }
         public T1 Item1 { get { throw null; } }
@@ -3946,7 +3946,7 @@ namespace System.Collections.Generic
     {
         int Compare(T x, T y);
     }
-    public partial interface IDictionary<TKey, TValue> : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.IEnumerable where TKey : object
+    public partial interface IDictionary<TKey, TValue> : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.IEnumerable where TKey : notnull
     {
         TValue this[TKey key] { get; set; }
         System.Collections.Generic.ICollection<TKey> Keys { get; }
@@ -3980,7 +3980,7 @@ namespace System.Collections.Generic
     {
         int Count { get; }
     }
-    public partial interface IReadOnlyDictionary<TKey, TValue> : System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.IEnumerable where TKey : object
+    public partial interface IReadOnlyDictionary<TKey, TValue> : System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.IEnumerable where TKey : notnull
     {
         TValue this[TKey key] { get; }
         System.Collections.Generic.IEnumerable<TKey> Keys { get; }
@@ -4979,7 +4979,7 @@ namespace System.Globalization
     public partial class TextElementEnumerator : System.Collections.IEnumerator
     {
         internal TextElementEnumerator() { }
-#pragma warning disable CS8612 // TODO-NULLABLE: Covariant return types (https://github.com/dotnet/roslyn/issues/23268)
+#pragma warning disable CS8612 // TODO-NULLABLE: Covariance in interfaces (https://github.com/dotnet/roslyn/issues/35227)
         public object Current { get { throw null; } }
 #pragma warning restore CS8612
         public int ElementIndex { get { throw null; } }