Added tests, and fixed some bugs using it
This commit is contained in:
committed by
Valentin Kipyatkov
parent
251d87fd22
commit
939b4768f5
@@ -217,15 +217,15 @@ class KotlinIndicesHelper(
|
||||
|
||||
fun getKotlinStatics(name: String): Collection<DeclarationDescriptor> {
|
||||
return sequenceOf(KotlinFunctionShortNameIndex.getInstance().get(name, project, scope),
|
||||
KotlinPropertyShortNameIndex.getInstance().get(name, project, scope)).
|
||||
flatMap { it.asSequence() }
|
||||
KotlinPropertyShortNameIndex.getInstance().get(name, project, scope))
|
||||
.flatMap { it.asSequence() }
|
||||
.mapNotNull {
|
||||
when (it) {
|
||||
is KtNamedFunction -> it.descriptor
|
||||
is KtProperty -> it.descriptor
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
}.filterNot { it.importableFqName == null }
|
||||
.filter(descriptorFilter)
|
||||
.toSet()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user