Skip to content

Commit ce7cea6

Browse files
authored
Fix MemberReferenceComparer (#190)
***NO_CI***
1 parent d360a6d commit ce7cea6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

MetadataProcessor.Shared/Tables/nanoMethodReferenceTable.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
// Original work from Oleg Rakhmatulin.
@@ -35,13 +35,13 @@ private sealed class MemberReferenceComparer : IEqualityComparer<MethodReference
3535
/// <inheritdoc/>
3636
public bool Equals(MethodReference lhs, MethodReference rhs)
3737
{
38-
return string.Equals(lhs.FullName, rhs.FullName, StringComparison.Ordinal);
38+
return lhs.MetadataToken.Equals(rhs.MetadataToken);
3939
}
4040

4141
/// <inheritdoc/>
4242
public int GetHashCode(MethodReference that)
4343
{
44-
return that.FullName.GetHashCode();
44+
return that.MetadataToken.RID.GetHashCode();
4545
}
4646
}
4747

0 commit comments

Comments
 (0)