[LL FIR] Remove LLFirProviderHelper.getTopLevelClassNamesInPackage
- We shouldn't bypass the symbol names cache, as the IDE declaration provider doesn't cache name sets. ^KT-57314
This commit is contained in:
committed by
Space Team
parent
efe587691b
commit
8d2bf8828c
+5
-1
@@ -101,7 +101,11 @@ internal class LLFirProvider(
|
|||||||
|
|
||||||
override fun getFirFilesByPackage(fqName: FqName): List<FirFile> = error("Should not be called in FIR IDE")
|
override fun getFirFilesByPackage(fqName: FqName): List<FirFile> = error("Should not be called in FIR IDE")
|
||||||
|
|
||||||
override fun getClassNamesInPackage(fqName: FqName): Set<Name> = providerHelper.getTopLevelClassNamesInPackage(fqName)
|
override fun getClassNamesInPackage(fqName: FqName): Set<Name> =
|
||||||
|
providerHelper.symbolNameCache.getTopLevelClassifierNamesInPackage(fqName)
|
||||||
|
?: errorWithAttachment("Cannot compute the set of class names in the given package") {
|
||||||
|
withEntry("packageFqName", fqName.asString())
|
||||||
|
}
|
||||||
|
|
||||||
@NoMutableState
|
@NoMutableState
|
||||||
internal inner class SymbolProvider : LLFirKotlinSymbolProvider(session) {
|
internal inner class SymbolProvider : LLFirKotlinSymbolProvider(session) {
|
||||||
|
|||||||
-5
@@ -119,11 +119,6 @@ internal class LLFirProviderHelper(
|
|||||||
return classifierByClassId.getNotNullValueForNotNullContext(classId, classLikeDeclaration)
|
return classifierByClassId.getNotNullValueForNotNullContext(classId, classLikeDeclaration)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getTopLevelClassNamesInPackage(packageFqName: FqName): Set<Name> {
|
|
||||||
if (!allowKotlinPackage && packageFqName.isKotlinPackage()) return emptySet()
|
|
||||||
return declarationProvider.getTopLevelKotlinClassLikeDeclarationNamesInPackage(packageFqName)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getTopLevelCallableSymbols(packageFqName: FqName, name: Name): List<FirCallableSymbol<*>> {
|
fun getTopLevelCallableSymbols(packageFqName: FqName, name: Name): List<FirCallableSymbol<*>> {
|
||||||
if (!allowKotlinPackage && packageFqName.isKotlinPackage()) return emptyList()
|
if (!allowKotlinPackage && packageFqName.isKotlinPackage()) return emptyList()
|
||||||
val callableId = CallableId(packageFqName, name)
|
val callableId = CallableId(packageFqName, name)
|
||||||
|
|||||||
Reference in New Issue
Block a user