Don't try to resolve a class with no containing file (such as LightBRClass) to descriptor (EA-91890 - (AS only, no containing file, from Java light classes) LET: GetModuleInfoKt$getModuleInfo$.invoke)

This commit is contained in:
Dmitry Jemerov
2017-01-26 20:04:58 +01:00
parent 1337a5216c
commit 2342aeef49
@@ -225,7 +225,7 @@ class KotlinIndicesHelper(
fun getJvmClassesByName(name: String): Collection<ClassDescriptor> {
return PsiShortNamesCache.getInstance(project).getClassesByName(name, scope)
.filter { it in scope }
.filter { it in scope && it.containingFile != null }
.mapNotNull { it.resolveToDescriptor(resolutionFacade) }
.filter(descriptorFilter)
.toSet()