[FIR] Add symbol to all declarations. Get rid of FirSymbolOwner

This commit is contained in:
Dmitriy Novozhilov
2021-06-20 11:42:52 +03:00
parent 39cd1c8504
commit b3e5c6e079
254 changed files with 1305 additions and 1297 deletions
@@ -191,11 +191,11 @@ fun deserializeClassToSymbol(
addCloneForArrayIfNeeded(classId, context.dispatchReceiver)
addSerializableIfNeeded(classId)
declarations.sortWith(object : Comparator<FirDeclaration> {
override fun compare(a: FirDeclaration, b: FirDeclaration): Int {
declarations.sortWith(object : Comparator<FirDeclaration<*>> {
override fun compare(a: FirDeclaration<*>, b: FirDeclaration<*>): Int {
// Reorder members based on their type and name only.
// See FE 1.0's [DeserializedMemberScope#addMembers].
if (a is FirMemberDeclaration && b is FirMemberDeclaration) {
if (a is FirMemberDeclaration<*> && b is FirMemberDeclaration<*>) {
return FirMemberDeclarationComparator.TypeAndNameComparator.compare(a, b)
}
return 0