From f8594e16f9befa572e4c2837cfce7ec58145c243 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Jun 2019 10:41:32 -0700 Subject: [PATCH] [master] Update dependencies from dotnet/arcade (dotnet/corefx#38474) * 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/System/Collections/Concurrent/ConcurrentDictionary.cs | 4 ++-- .../System.Collections/src/System/Collections/BitArray.cs | 2 +- .../src/System/Collections/Generic/CollectionExtensions.cs | 8 ++++---- .../src/System/Collections/Generic/SortedDictionary.cs | 2 +- .../src/System/Collections/Generic/SortedList.cs | 2 +- src/libraries/System.Runtime/ref/System.Runtime.cs | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs b/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs index f6696c1..3729dc7 100644 --- a/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs +++ b/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs @@ -32,7 +32,7 @@ namespace System.Collections.Concurrent /// [DebuggerTypeProxy(typeof(IDictionaryDebugView<,>))] [DebuggerDisplay("Count = {Count}")] - public class ConcurrentDictionary : IDictionary, IDictionary, IReadOnlyDictionary where TKey : object + public class ConcurrentDictionary : IDictionary, IDictionary, IReadOnlyDictionary where TKey : notnull { /// /// 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 { diff --git a/src/libraries/System.Collections/src/System/Collections/BitArray.cs b/src/libraries/System.Collections/src/System/Collections/BitArray.cs index 3248dde..4591929 100644 --- a/src/libraries/System.Collections/src/System/Collections/BitArray.cs +++ b/src/libraries/System.Collections/src/System/Collections/BitArray.cs @@ -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 { diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs b/src/libraries/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs index f21da16..ecf8b14 100644 --- a/src/libraries/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs +++ b/src/libraries/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs @@ -9,13 +9,13 @@ namespace System.Collections.Generic public static class CollectionExtensions { [return: MaybeNull] - public static TValue GetValueOrDefault(this IReadOnlyDictionary dictionary, TKey key) where TKey : object + public static TValue GetValueOrDefault(this IReadOnlyDictionary 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(this IReadOnlyDictionary dictionary, TKey key, [AllowNull] TValue defaultValue) where TKey : object + public static TValue GetValueOrDefault(this IReadOnlyDictionary 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(this IDictionary dictionary, TKey key, TValue value) where TKey : object + public static bool TryAdd(this IDictionary 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(this IDictionary dictionary, TKey key, [MaybeNullWhen(false)] out TValue value) where TKey : object + public static bool Remove(this IDictionary dictionary, TKey key, [MaybeNullWhen(false)] out TValue value) where TKey : notnull { if (dictionary == null) { diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs b/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs index 36e01ee..324f152 100644 --- a/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs +++ b/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs @@ -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 : IDictionary, IDictionary, IReadOnlyDictionary where TKey : object + public class SortedDictionary : IDictionary, IDictionary, IReadOnlyDictionary where TKey : notnull { [NonSerialized] private KeyCollection? _keys; diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/SortedList.cs b/src/libraries/System.Collections/src/System/Collections/Generic/SortedList.cs index ce50e47..c56fa66 100644 --- a/src/libraries/System.Collections/src/System/Collections/Generic/SortedList.cs +++ b/src/libraries/System.Collections/src/System/Collections/Generic/SortedList.cs @@ -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 : - IDictionary, IDictionary, IReadOnlyDictionary where TKey : object + IDictionary, IDictionary, IReadOnlyDictionary where TKey : notnull { private TKey[] keys; // Do not rename (binary serialization) private TValue[] values; // Do not rename (binary serialization) diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index 3f653cd..444b569 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -2915,7 +2915,7 @@ namespace System int System.IComparable.CompareTo(object? obj) { throw null; } public override string ToString() { throw null; } } - public partial class Tuple : System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable, System.IComparable, System.Runtime.CompilerServices.ITuple where TRest : object + public partial class Tuple : 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 : System.Collections.Generic.ICollection>, System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable where TKey : object + public partial interface IDictionary : System.Collections.Generic.ICollection>, System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable where TKey : notnull { TValue this[TKey key] { get; set; } System.Collections.Generic.ICollection Keys { get; } @@ -3980,7 +3980,7 @@ namespace System.Collections.Generic { int Count { get; } } - public partial interface IReadOnlyDictionary : System.Collections.Generic.IEnumerable>, System.Collections.Generic.IReadOnlyCollection>, System.Collections.IEnumerable where TKey : object + public partial interface IReadOnlyDictionary : System.Collections.Generic.IEnumerable>, System.Collections.Generic.IReadOnlyCollection>, System.Collections.IEnumerable where TKey : notnull { TValue this[TKey key] { get; } System.Collections.Generic.IEnumerable 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; } } -- 2.7.4