From 67aef18408528a8507b6cafa92247c8a2acb6772 Mon Sep 17 00:00:00 2001 From: Viktor De Pasquale Date: Wed, 5 May 2021 14:15:42 +0200 Subject: [PATCH] Fixed missing hashcode declaration --- src/main/kotlin/dev/chainmail/taggy/pattern/VersionCode.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/kotlin/dev/chainmail/taggy/pattern/VersionCode.kt b/src/main/kotlin/dev/chainmail/taggy/pattern/VersionCode.kt index 22b2675..87396dc 100644 --- a/src/main/kotlin/dev/chainmail/taggy/pattern/VersionCode.kt +++ b/src/main/kotlin/dev/chainmail/taggy/pattern/VersionCode.kt @@ -50,4 +50,10 @@ class VersionCode( return compareTo(other) == 0 } + override fun hashCode(): Int { + var result = segments.hashCode() + result = 31 * result + (revision ?: 0) + return result + } + } \ No newline at end of file