Skip to content

Commit

Permalink
Add missing nullability annotation for "FullGroupJoin" comparer (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
sid-6581 authored Mar 29, 2021
1 parent 657e327 commit ee23824
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion MoreLinq.Test/FullGroupJoinTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// limitations under the License.
#endregion

#nullable enable

namespace MoreLinq.Test
{
using System;
Expand Down Expand Up @@ -136,7 +138,7 @@ public void FullGroupPreservesOrder(OverloadCase overloadCase)
switch (overloadCase)
{
case CustomResult:
return listA.FullGroupJoin(listB, getKey, getKey, ValueTuple.Create);
return listA.FullGroupJoin(listB, getKey, getKey, ValueTuple.Create, comparer: null);
case TupleResult:
return listA.FullGroupJoin(listB, getKey, getKey);
default:
Expand Down
4 changes: 2 additions & 2 deletions MoreLinq/Extensions.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2391,7 +2391,7 @@ public static partial class FullGroupJoinExtension
IEnumerable<TSecond> second,
Func<TFirst, TKey> firstKeySelector,
Func<TSecond, TKey> secondKeySelector,
IEqualityComparer<TKey> comparer)
IEqualityComparer<TKey>? comparer)
=> MoreEnumerable.FullGroupJoin(first, second, firstKeySelector, secondKeySelector, comparer);

/// <summary>
Expand Down Expand Up @@ -2450,7 +2450,7 @@ public static IEnumerable<TResult> FullGroupJoin<TFirst, TSecond, TKey, TResult>
Func<TFirst, TKey> firstKeySelector,
Func<TSecond, TKey> secondKeySelector,
Func<TKey, IEnumerable<TFirst>, IEnumerable<TSecond>, TResult> resultSelector,
IEqualityComparer<TKey> comparer)
IEqualityComparer<TKey>? comparer)
=> MoreEnumerable.FullGroupJoin(first, second, firstKeySelector, secondKeySelector, resultSelector, comparer);

}
Expand Down
4 changes: 2 additions & 2 deletions MoreLinq/FullGroupJoin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static partial class MoreEnumerable
IEnumerable<TSecond> second,
Func<TFirst, TKey> firstKeySelector,
Func<TSecond, TKey> secondKeySelector,
IEqualityComparer<TKey> comparer)
IEqualityComparer<TKey>? comparer)
{
return FullGroupJoin(first, second, firstKeySelector, secondKeySelector, ValueTuple.Create, comparer);
}
Expand Down Expand Up @@ -139,7 +139,7 @@ public static IEnumerable<TResult> FullGroupJoin<TFirst, TSecond, TKey, TResult>
Func<TFirst, TKey> firstKeySelector,
Func<TSecond, TKey> secondKeySelector,
Func<TKey, IEnumerable<TFirst>, IEnumerable<TSecond>, TResult> resultSelector,
IEqualityComparer<TKey> comparer)
IEqualityComparer<TKey>? comparer)
{
if (first == null) throw new ArgumentNullException(nameof(first));
if (second == null) throw new ArgumentNullException(nameof(second));
Expand Down

0 comments on commit ee23824

Please sign in to comment.