Find usages: only collect those descriptors which resolve to callables
Fix failing test on the buildserver
This commit is contained in:
@@ -136,10 +136,10 @@ public class JetRefactoringUtil {
|
|||||||
|
|
||||||
Project project = declaration.getProject();
|
Project project = declaration.getProject();
|
||||||
Map<PsiElement, CallableDescriptor> overriddenElementsToDescriptor = new HashMap<PsiElement, CallableDescriptor>();
|
Map<PsiElement, CallableDescriptor> overriddenElementsToDescriptor = new HashMap<PsiElement, CallableDescriptor>();
|
||||||
for (CallableDescriptor overridenDescriptor : OverrideResolver.getAllOverriddenDescriptors(declarationDescriptor)) {
|
for (CallableDescriptor overriddenDescriptor : OverrideResolver.getAllOverriddenDescriptors(declarationDescriptor)) {
|
||||||
PsiElement overridenDeclaration = DescriptorToDeclarationUtil.getDeclaration(project, overridenDescriptor);
|
PsiElement overriddenDeclaration = DescriptorToDeclarationUtil.getDeclaration(project, overriddenDescriptor);
|
||||||
if (overridenDeclaration != null) {
|
if (PsiTreeUtil.instanceOf(overriddenDeclaration, JetNamedFunction.class, JetProperty.class, PsiMethod.class)) {
|
||||||
overriddenElementsToDescriptor.put(overridenDeclaration, overridenDescriptor);
|
overriddenElementsToDescriptor.put(overriddenDeclaration, overriddenDescriptor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ignore != null) {
|
if (ignore != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user