Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ private static bool TryGetGuid(INamedTypeSymbol interfaceSymbol, InterfaceDeclar

public override int GetHashCode()
{
// ContainingSyntax and ContainingSyntaxContext do not implement GetHashCode
return HashCode.Combine(Type, TypeDefinitionContext, InterfaceId);
// ContainingSyntax does not implement GetHashCode
return HashCode.Combine(Type, ThisInterfaceKey, BaseInterfaceKey, TypeDefinitionContext, InterfaceId);
}

public bool Equals(ComInterfaceInfo other)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public override int GetHashCode()
int code = ContainingNamespace?.GetHashCode() ?? 0;
foreach (ContainingSyntax containingSyntax in ContainingSyntax)
{
code ^= containingSyntax.Identifier.Value.GetHashCode();
code = HashCode.Combine(code, containingSyntax.Identifier.Value);
}
return code;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public virtual bool Equals(ManagedTypeInfo? other)

public override int GetHashCode()
{
return FullTypeName.GetHashCode() ^ DiagnosticFormattedName.GetHashCode();
return HashCode.Combine(FullTypeName, DiagnosticFormattedName);
}

protected ManagedTypeInfo(ManagedTypeInfo original)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public override int GetHashCode()
int hash = 0;
foreach (KeyValuePair<MarshalMode, CustomTypeMarshallerData> mode in Modes)
{
hash ^= mode.Key.GetHashCode() ^ mode.Value.GetHashCode();
hash = HashCode.Combine(hash, mode.Key, mode.Value);
}
return hash;
}
Expand Down