Remove TKey : notnull constraint from `IDictionary<TKey, TValue>` (#793)
authorStephen Toub <stoub@microsoft.com>
Fri, 13 Dec 2019 17:16:55 +0000 (12:16 -0500)
committerSantiago Fernandez Madero <safern@microsoft.com>
Fri, 13 Dec 2019 17:16:55 +0000 (11:16 -0600)
commit48a78bfa13e9c710851690621fc2c0fe1637802c
treeecdee260ac7ad66453408ce968d31903b162290f
parentb6e74405ae3af979811f605489f5c5e341985c1e
Remove TKey : notnull constraint from `IDictionary<TKey, TValue>` (#793)

* Remove TKey : notnull constraint from `IDictionary<TKey, TValue>`

The interface explicitly documents that some implementations may choose to support null keys.

* Remove TKey : notnull constraint from `IReadOnlyDictionary<TKey, TValue>`

* Remove notnull constraints from extension methods on those interfaces
src/libraries/System.Collections/ref/System.Collections.cs
src/libraries/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs
src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IDictionary.cs
src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IReadOnlyDictionary.cs
src/libraries/System.Runtime/ref/System.Runtime.cs