Skip to content

Commit

Permalink
Fix a comparison bug causing incorrect analyzer results
Browse files Browse the repository at this point in the history
  • Loading branch information
ElektroKill committed Sep 9, 2023
1 parent 84c120f commit 605cb6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Extensions/dnSpy.Analyzer/TreeNodes/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ static MethodDef GetOriginalCodeLocation(MethodDef method) {
}

internal static bool CheckEquals(IMemberRef? mr1, IMemberRef? mr2) =>
new SigComparer(SigComparerOptions.CompareDeclaringTypes | SigComparerOptions.PrivateScopeIsComparable).Equals(mr1, mr2);
new SigComparer(SigComparerOptions.CompareDeclaringTypes | SigComparerOptions.PrivateScopeIsComparable |
SigComparerOptions.ReferenceCompareForMemberDefsInSameModule).Equals(mr1, mr2);

static MethodDef? FindVariableOfTypeUsageInType(TypeDef type, TypeDef variableType) {
foreach (MethodDef method in type.Methods) {
Expand Down

0 comments on commit 605cb6a

Please sign in to comment.