Important JavaDescriptorResolver refactoring
This patch implement own member filling with supertype scope. Before this patch JDR relied on Idea hierarchy resolver. This patch does two things: * copies FunctionDescriptors from supertype scopes * rewrites containingDeclaration similary to how it is done in previous patch Patch is incomplete, in particular properties are not yet initialized properly, code needs cleanup, however the most important part of refactoring is done, and tests pass.
This commit is contained in:
+4
-2
@@ -22,6 +22,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.JetSemanticServices;
|
||||
import org.jetbrains.jet.lang.descriptors.CallableDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassKind;
|
||||
import org.jetbrains.jet.lang.descriptors.ValueParameterDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
||||
import org.jetbrains.jet.lang.resolve.OverridingUtil;
|
||||
@@ -109,7 +111,7 @@ public class OverloadingConflictResolver {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (discriminateGenericDescriptors && isGeneric(f)) {
|
||||
if (!isGeneric(g)) {
|
||||
return false;
|
||||
@@ -122,7 +124,7 @@ public class OverloadingConflictResolver {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private boolean isGeneric(CallableDescriptor f) {
|
||||
return !f.getOriginal().getTypeParameters().isEmpty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user