[FIR] Type "top-level classifier names in package" as Name
- This is more consistent with "top-level callable names in package" and simplifies the set construction quite a bit, as we can avoid a lot of `asString` conversions.
This commit is contained in:
committed by
Space Team
parent
8034d522b9
commit
efe587691b
+4
-4
@@ -62,11 +62,11 @@ class NativeForwardDeclarationsSymbolProvider(
|
||||
}
|
||||
}
|
||||
|
||||
private val includedForwardDeclarationsByPackage: Map<FqName, Set<String>> by lazy {
|
||||
buildMap<FqName, MutableSet<String>> {
|
||||
private val includedForwardDeclarationsByPackage: Map<FqName, Set<Name>> by lazy {
|
||||
buildMap<FqName, MutableSet<Name>> {
|
||||
for (classId in includedForwardDeclarations) {
|
||||
getOrPut(classId.packageFqName) { mutableSetOf() }
|
||||
.add(classId.shortClassName.asString())
|
||||
.add(classId.shortClassName)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ class NativeForwardDeclarationsSymbolProvider(
|
||||
}
|
||||
|
||||
override val symbolNamesProvider: FirSymbolNamesProvider = object : FirSymbolNamesProviderWithoutCallables() {
|
||||
override fun getTopLevelClassifierNamesInPackage(packageFqName: FqName): Set<String> =
|
||||
override fun getTopLevelClassifierNamesInPackage(packageFqName: FqName): Set<Name> =
|
||||
includedForwardDeclarationsByPackage[packageFqName].orEmpty()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user