We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 980dcae commit 93ce7b8Copy full SHA for 93ce7b8
1 file changed
src/ImmutableObjectGraph.Generation/CodeGen.cs
@@ -219,9 +219,15 @@ private static bool HasEqualityOperators(ITypeSymbol symbol)
219
{
220
Requires.NotNull(symbol, nameof(symbol));
221
222
- // Reference types inherit their equality operators from System.Object.
223
if (symbol.IsReferenceType)
224
+ // Reference types inherit their equality operators from System.Object.
225
+ return true;
226
+ }
227
+
228
+ if (symbol.SpecialType != SpecialType.None)
229
+ {
230
+ // C# knows how to run equality checks for special (built-in) types like int.
231
return true;
232
}
233
0 commit comments