Skip to content

Commit fd41fb3

Browse files
committed
Add method name in the checking because the signature in CCI doesn't look for method nane...
1 parent 5d27bac commit fd41fb3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Backend/Analyses/ClassHierarchyCallGraphAnalysis.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private IMethodReference FindMethodImplementation(INamedTypeReference receiverTy
113113
var receiverTypeDef = receiverType.ResolvedType;
114114
if (receiverTypeDef == null) break;
115115

116-
var matchingMethod = receiverTypeDef.Methods.SingleOrDefault(m => MemberHelper.SignaturesAreEqual(m, method));
116+
var matchingMethod = receiverTypeDef.Methods.SingleOrDefault(m => m.Name.UniqueKey == method.Name.UniqueKey && MemberHelper.SignaturesAreEqual(m, method));
117117

118118
if (matchingMethod != null)
119119
{
@@ -141,7 +141,7 @@ private IEnumerable<IMethodReference> ResolvePossibleCallees(IMethodReference me
141141
var subtypes = classHierarchy.GetAllSubtypes(methodref.ContainingType);
142142
var compatibleMethods = from t in subtypes
143143
from m in t.Members.OfType<IMethodDefinition>()
144-
where MemberHelper.SignaturesAreEqual(m, methodref)
144+
where m.Name.UniqueKey == methodref.Name.UniqueKey && MemberHelper.SignaturesAreEqual(m, methodref)
145145
select m;
146146

147147
result.UnionWith(compatibleMethods);

0 commit comments

Comments
 (0)