Do not fail when an allegedly present name is not resolved

This commit is contained in:
Andrey Breslav
2013-10-31 13:02:16 +04:00
parent e538668229
commit 71ed2d2c71
@@ -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()) {