FIR IDE: do not search for sealed class inheritors on every class resolve

This commit is contained in:
Ilya Kirillov
2021-04-01 17:55:24 +02:00
parent 0e93924ff3
commit 5ceec858aa
13 changed files with 133 additions and 117 deletions
@@ -166,8 +166,7 @@ class FirElementSerializer private constructor(
}
if (klass is FirRegularClass && klass.modality == Modality.SEALED) {
val inheritors = klass.sealedInheritors
requireNotNull(inheritors)
val inheritors = klass.getSealedClassInheritors(session)
for (inheritorId in inheritors) {
builder.addSealedSubclassFqName(stringTable.getQualifiedClassNameIndex(inheritorId))
}