Skip to content

Commit

Permalink
Fixed the comparable implemntation. (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgernand authored May 29, 2022
1 parent c9c8f90 commit 8c2631e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Fluxera.ValueObject/PrimitiveValueObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// <typeparam name="TValueObject">The type of the value object.</typeparam>
/// <typeparam name="TValue">The type of the value.</typeparam>
[PublicAPI]
public abstract class PrimitiveValueObject<TValueObject, TValue> : ValueObject<TValueObject>, IComparable<PrimitiveValueObject<TValueObject, TValue>>
public abstract class PrimitiveValueObject<TValueObject, TValue> : ValueObject<TValueObject>, IComparable<TValueObject>
where TValueObject : PrimitiveValueObject<TValueObject, TValue>
where TValue : IComparable
{
Expand All @@ -45,7 +45,7 @@ protected PrimitiveValueObject(TValue value)
public TValue Value { get; private set; }

/// <inheritdoc />
public int CompareTo(PrimitiveValueObject<TValueObject, TValue> other)
public int CompareTo(TValueObject other)
{
return (this.Value, other.Value) switch
{
Expand Down

0 comments on commit 8c2631e

Please sign in to comment.