Not looking for super methods which are Object methods in interfaces, because they are not loaded by JDR.

This commit is contained in:
Evgeny Gerashchenko
2013-03-27 17:25:44 +04:00
parent d8ccfe55b6
commit 8130c813e9
2 changed files with 6 additions and 2 deletions
@@ -33,6 +33,7 @@ import org.jetbrains.jet.lang.resolve.BindingContextUtils;
import org.jetbrains.jet.lang.resolve.BindingTrace;
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
import org.jetbrains.jet.lang.resolve.java.*;
import org.jetbrains.jet.lang.resolve.java.provider.MembersCache;
import org.jetbrains.jet.lang.resolve.java.wrapper.PsiMethodWrapper;
import org.jetbrains.jet.lang.resolve.name.FqName;
import org.jetbrains.jet.lang.resolve.name.FqNameUnsafe;
@@ -228,7 +229,10 @@ public class SignaturesPropagationData {
? trace.get(BindingContext.DECLARATION_TO_DESCRIPTOR, ((JetClsMethod) superMethod).getOrigin())
: findSuperFunction(superclassToFunctions.get(classFqName), superMethod);
if (superFun == null) {
reportCantFindSuperFunction(method);
// Super methods which are Object methods in interfaces are not loaded by JDR.
if (!MembersCache.isObjectMethodInInterface(superMethod)) {
reportCantFindSuperFunction(method);
}
continue;
}
@@ -315,7 +315,7 @@ public final class MembersCache {
}
}
private static boolean isObjectMethodInInterface(@NotNull PsiMember member) {
public static boolean isObjectMethodInInterface(@NotNull PsiMember member) {
if (!(member instanceof PsiMethod)) {
return false;
}