polyadic / funcky

Funcky is a Functional Library for C#
https://polyadic.github.io/funcky
Apache License 2.0
19 stars 4 forks source link

`OptionEqualityComparer.GetHashCode` does not use passed comparer #648

Closed bash closed 2 years ago

bash commented 2 years ago

Current implementation:

public override int GetHashCode(Option<TItem> option)
    => option.Match(
        none: 0,
        some: item => item.GetHashCode());

should be:

public override int GetHashCode(Option<TItem> option)
    => option.Match(
        none: 0,
        some: _comparer.GetHashCode);