From 8c2631eae6cbd35520dab158f2f3e0d2175d08e3 Mon Sep 17 00:00:00 2001 From: Matthias Gernand Date: Sun, 29 May 2022 21:23:42 +0200 Subject: [PATCH] Fixed the comparable implemntation. (#16) --- src/Fluxera.ValueObject/PrimitiveValueObject.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fluxera.ValueObject/PrimitiveValueObject.cs b/src/Fluxera.ValueObject/PrimitiveValueObject.cs index 219f544..db59def 100644 --- a/src/Fluxera.ValueObject/PrimitiveValueObject.cs +++ b/src/Fluxera.ValueObject/PrimitiveValueObject.cs @@ -18,7 +18,7 @@ /// The type of the value object. /// The type of the value. [PublicAPI] - public abstract class PrimitiveValueObject : ValueObject, IComparable> + public abstract class PrimitiveValueObject : ValueObject, IComparable where TValueObject : PrimitiveValueObject where TValue : IComparable { @@ -45,7 +45,7 @@ protected PrimitiveValueObject(TValue value) public TValue Value { get; private set; } /// - public int CompareTo(PrimitiveValueObject other) + public int CompareTo(TValueObject other) { return (this.Value, other.Value) switch {