File tree Expand file tree Collapse file tree
ValidCode/Recursion/InstanceMapRepro Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ namespace ValidCode.Recursion.InstanceMapRepro;
1010internal class InstanceMap < TKey , TValue > : IEnumerable < KeyValuePair < TKey , TValue > >
1111 where TKey : class
1212{
13- private readonly Dictionary < Maybe < TKey > , TValue > inner = new Dictionary < Maybe < TKey > , TValue > ( KeyComparer . Default ) ;
13+ private readonly Dictionary < Maybe < TKey > , TValue > inner = new ( KeyComparer . Default ) ;
1414
1515#pragma warning disable INPC017 // Backing field name must match.
1616 internal object Gate => this . inner ;
@@ -59,14 +59,15 @@ internal bool ContainsKey(TKey key)
5959
6060 private sealed class KeyComparer : IEqualityComparer < Maybe < TKey > >
6161 {
62- internal static readonly KeyComparer Default = new KeyComparer ( ) ;
62+ internal static readonly KeyComparer Default = new ( ) ;
6363
6464 private KeyComparer ( )
6565 {
6666 }
6767
68- public bool Equals ( Maybe < TKey > x , Maybe < TKey > y ) => x . HasValue == y . HasValue &&
69- ReferenceEquals ( x . Value , y . Value ) ;
68+ public bool Equals ( Maybe < TKey > x , Maybe < TKey > y ) =>
69+ x . HasValue == y . HasValue &&
70+ ReferenceEquals ( x . Value , y . Value ) ;
7071
7172 public int GetHashCode ( Maybe < TKey > obj )
7273 {
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public T Value
5858 /// <summary>
5959 /// Create an instance with a value.
6060 /// </summary>
61- public static Maybe < T > Some ( T value ) => new Maybe < T > ( hasValue : true , value : value ) ;
61+ public static Maybe < T > Some ( T value ) => new ( hasValue : true , value : value ) ;
6262#pragma warning restore CA1000 // Do not declare static members on generic types
6363
6464 /// <inheritdoc />
You can’t perform that action at this time.
0 commit comments