Do not fail when an allegedly present name is not resolved
This commit is contained in:
+8
-2
@@ -279,12 +279,18 @@ public abstract class LazyJavaMemberScope(
|
||||
|
||||
for (name in getAllPackageNames()) {
|
||||
val descriptor = getNamespace(name)
|
||||
result.add(descriptor ?: throw IllegalStateException("Descriptor not found for name $name in " + getContainingDeclaration()))
|
||||
if (descriptor != null) {
|
||||
// Null signifies that a package found in Java is not present in Kotlin
|
||||
result.add(descriptor)
|
||||
}
|
||||
}
|
||||
|
||||
for (name in getAllClassNames()) {
|
||||
val descriptor = getClassifier(name)
|
||||
result.add(descriptor ?: throw IllegalStateException("Descriptor not found for name $name in " + getContainingDeclaration()))
|
||||
if (descriptor != null) {
|
||||
// Null signifies that a class found in Java is not present in Kotlin (e.g. package class)
|
||||
result.add(descriptor)
|
||||
}
|
||||
}
|
||||
|
||||
for (name in getAllFunctionNames()) {
|
||||
|
||||
Reference in New Issue
Block a user