[Analysis API] fix missing names in KtFirStarImportingScope
The missing name types were: java classifier names, callable/classifier names generated by plugins
This commit is contained in:
committed by
Space Team
parent
546191d1b3
commit
d1da3b8acd
+2
-2
@@ -35,7 +35,7 @@ internal class KtFirStarImportingScope(
|
||||
override fun getPossibleCallableNames(): Set<Name> = withValidityAssertion {
|
||||
imports.flatMapTo(hashSetOf()) { import: Import ->
|
||||
if (import.relativeClassName == null) { // top level callable
|
||||
analysisSession.useSiteScopeDeclarationProvider.getTopLevelCallableNamesInPackage(import.packageFqName)
|
||||
DeclarationsInPackageProvider.getTopLevelCallableNamesInPackageProvider(import.packageFqName, analysisSession)
|
||||
} else { //member
|
||||
val classId = import.resolvedClassId ?: error("Class id should not be null as relativeClassName is not null")
|
||||
firScope.getStaticsScope(classId)?.getCallableNames().orEmpty()
|
||||
@@ -50,7 +50,7 @@ internal class KtFirStarImportingScope(
|
||||
override fun getPossibleClassifierNames(): Set<Name> = withValidityAssertion {
|
||||
imports.flatMapTo(hashSetOf()) { import ->
|
||||
if (import.relativeClassName == null) {
|
||||
analysisSession.useSiteScopeDeclarationProvider.getTopLevelKotlinClassLikeDeclarationNamesInPackage(import.packageFqName)
|
||||
DeclarationsInPackageProvider.getTopLevelClassifierNamesInPackageProvider(import.packageFqName, analysisSession)
|
||||
} else {
|
||||
val classId = import.resolvedClassId ?: error("Class id should not be null as relativeClassName is not null")
|
||||
firScope.getStaticsScope(classId)?.getClassifierNames().orEmpty()
|
||||
|
||||
Reference in New Issue
Block a user