disable +JDK macro in JetDiagnosticsTest and fix (actually hide) revealed bugs
+JDK was not very helpful
This commit is contained in:
+2
@@ -219,6 +219,7 @@ public class JavaDescriptorResolver {
|
||||
// First, let's check that this is a real Java class, not a Java's view on a Kotlin class:
|
||||
ClassDescriptor kotlinClassDescriptor = semanticServices.getKotlinClassDescriptor(qualifiedName);
|
||||
if (kotlinClassDescriptor != null) {
|
||||
// TODO: return null, no loops here
|
||||
return new ResolverSrcClassData(kotlinClassDescriptor);
|
||||
}
|
||||
|
||||
@@ -258,6 +259,7 @@ public class JavaDescriptorResolver {
|
||||
// First, let's check that this is a real Java class, not a Java's view on a Kotlin class:
|
||||
ClassDescriptor kotlinClassDescriptor = semanticServices.getKotlinClassDescriptor(qualifiedName);
|
||||
if (kotlinClassDescriptor != null) {
|
||||
// TODO: return null, no loops here
|
||||
return kotlinClassDescriptor;
|
||||
}
|
||||
|
||||
|
||||
+9
-1
@@ -29,6 +29,7 @@ import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassifierDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
@@ -68,7 +69,14 @@ public class JavaPackageScope extends JavaClassOrPackageScope {
|
||||
|
||||
@Override
|
||||
public ClassifierDescriptor getClassifier(@NotNull String name) {
|
||||
return semanticServices.getDescriptorResolver().resolveClass(getQualifiedName(packageFQN, name));
|
||||
ClassDescriptor classDescriptor = semanticServices.getDescriptorResolver().resolveClass(getQualifiedName(packageFQN, name));
|
||||
if (classDescriptor == null || DescriptorUtils.isObject(classDescriptor)) {
|
||||
// TODO: this is a big hack against several things that I barely understand myself and cannot explain
|
||||
// 1. We should not return objects from this method, and maybe JDR.resolveClass should not return too
|
||||
// 2. JDR should not return classes being analyzed
|
||||
return null;
|
||||
}
|
||||
return classDescriptor;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user