Skip to content

Commit 4fd156e

Browse files
committed
Source gen state should check HasKeyComparerImplementation as well
1 parent 4da9663 commit 4fd156e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Thinktecture.Runtime.Extensions.SourceGenerator/CodeAnalysis/SmartEnums/EnumSourceGeneratorState.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public bool Equals(EnumSourceGeneratorState? other)
111111
return TypeFullyQualified == other.TypeFullyQualified
112112
&& IsValidatable == other.IsValidatable
113113
&& HasCreateInvalidImplementation == other.HasCreateInvalidImplementation
114+
&& HasKeyComparerImplementation == other.HasKeyComparerImplementation
114115
&& IsReferenceType == other.IsReferenceType
115116
&& IsAbstract == other.IsAbstract
116117
&& AttributeInfo.Equals(other.AttributeInfo)
@@ -129,6 +130,7 @@ public override int GetHashCode()
129130
var hashCode = TypeFullyQualified.GetHashCode();
130131
hashCode = (hashCode * 397) ^ IsValidatable.GetHashCode();
131132
hashCode = (hashCode * 397) ^ HasCreateInvalidImplementation.GetHashCode();
133+
hashCode = (hashCode * 397) ^ HasKeyComparerImplementation.GetHashCode();
132134
hashCode = (hashCode * 397) ^ IsReferenceType.GetHashCode();
133135
hashCode = (hashCode * 397) ^ IsAbstract.GetHashCode();
134136
hashCode = (hashCode * 397) ^ AttributeInfo.GetHashCode();

0 commit comments

Comments
 (0)