identified can have last segment "namespace", for instance, javax.xml.namespace
This commit is contained in:
+4
-4
@@ -222,14 +222,14 @@ public class JavaDescriptorResolver {
|
|||||||
throw new IllegalStateException("both psiClass and psiPackage cannot be null");
|
throw new IllegalStateException("both psiClass and psiPackage cannot be null");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fqName.lastSegmentIs(JvmAbi.PACKAGE_CLASS)) {
|
|
||||||
throw new IllegalStateException("identified cannot have last segment " + JvmAbi.PACKAGE_CLASS + ": " + fqName);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.staticMembers = staticMembers;
|
this.staticMembers = staticMembers;
|
||||||
this.kotlin = psiClass != null &&
|
this.kotlin = psiClass != null &&
|
||||||
(new PsiClassWrapper(psiClass).getJetClass().isDefined() || psiClass.getName().equals(JvmAbi.PACKAGE_CLASS));
|
(new PsiClassWrapper(psiClass).getJetClass().isDefined() || psiClass.getName().equals(JvmAbi.PACKAGE_CLASS));
|
||||||
classOrNamespaceDescriptor = descriptor;
|
classOrNamespaceDescriptor = descriptor;
|
||||||
|
|
||||||
|
if (fqName.lastSegmentIs(JvmAbi.PACKAGE_CLASS) && psiClass != null && kotlin) {
|
||||||
|
throw new IllegalStateException("Kotlin namespace cannot have last segment " + JvmAbi.PACKAGE_CLASS + ": " + fqName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ResolverScopeData(boolean negative) {
|
protected ResolverScopeData(boolean negative) {
|
||||||
|
|||||||
Reference in New Issue
Block a user