Skip to content

Commit

Permalink
typeSolver is unable to find certain fqn of superclasses, referring t…
Browse files Browse the repository at this point in the history
…his task to methods getSuperClass and getInterfaces which are properly fixed in #1729
  • Loading branch information
daans committed Aug 7, 2018
1 parent 74a5ffa commit 98ea761
Showing 1 changed file with 7 additions and 10 deletions.
Expand Up @@ -190,19 +190,16 @@ public SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<
}

// add the method declaration of the superclass to the candidates, if present
String superclassFQN = getSuperclassFQN();
if (superclassFQN != null) {
SymbolReference<ResolvedMethodDeclaration> superClassMethodRef = MethodResolutionLogic.solveMethodInFQN
(superclassFQN, name, argumentsTypes, staticOnly, typeSolver);
if (superClassMethodRef.isSolved()) {
candidates.add(superClassMethodRef.getCorrespondingDeclaration());
}
SymbolReference<ResolvedMethodDeclaration> superClassMethodRef = MethodResolutionLogic
.solveMethodInType(getSuperClass().getTypeDeclaration(), name, argumentsTypes, staticOnly, typeSolver);
if (superClassMethodRef.isSolved()) {
candidates.add(superClassMethodRef.getCorrespondingDeclaration());
}

// add the method declaration of the interfaces to the candidates, if present
for (String interfaceFQN : getInterfaceFQNs()) {
SymbolReference<ResolvedMethodDeclaration> interfaceMethodRef = MethodResolutionLogic.solveMethodInFQN
(interfaceFQN, name, argumentsTypes, staticOnly, typeSolver);
for (ResolvedReferenceType interfaceRef : getInterfaces()) {
SymbolReference<ResolvedMethodDeclaration> interfaceMethodRef = MethodResolutionLogic.solveMethodInType(interfaceRef.getTypeDeclaration(), name, argumentsTypes,
staticOnly, typeSolver);
if (interfaceMethodRef.isSolved()) {
candidates.add(interfaceMethodRef.getCorrespondingDeclaration());
}
Expand Down

0 comments on commit 98ea761

Please sign in to comment.