Federico Tomassetti
04/01/2024, 8:48 AMFirDeclarationGenerationExtension
. When I see a class extending the base class of interest in getNestedClassifiersNames
then I wrote that down and the next time that getTopLevelClassIds
is invoked a return my new class id.
override fun getTopLevelClassIds(): Set<ClassId> {
val packages = mpNodeClassesEncountered.map { it.packageFqName() }.distinct()
val topLevelValues = packages.map { ClassId(it, Name.identifier("Language${it.asString().replace(".", "_").capitalize()}")) }.toMutableSet()
topLevelValues.removeAll(alreadyAddedClasses)
topLevelValues.map { sli ->
createTopLevelClass(sli, Key, classKind = ClassKind.OBJECT) {
superType(StarLasuLanguage::class.classId.toConeType())
}
}
alreadyAddedClasses.addAll(topLevelValues)
return alreadyAddedClasses
}
The problem is that reference to the object I generate are not resolved. The compiler behave as if the object does not exist.
Any idea about what I am doing wrong?Javier
04/01/2024, 9:15 AMFederico Tomassetti
04/02/2024, 9:35 AM