JVM_IR: avoid duplication in declaration lists during deserialization
This commit is contained in:
committed by
TeamCityServer
parent
fa4efd3303
commit
dffb22de9d
+3
-1
@@ -325,9 +325,11 @@ class IrDeclarationDeserializer(
|
|||||||
superTypes = proto.superTypeList.map { deserializeIrType(it) }
|
superTypes = proto.superTypeList.map { deserializeIrType(it) }
|
||||||
|
|
||||||
withExternalValue(isExternal) {
|
withExternalValue(isExternal) {
|
||||||
|
val oldDeclarations = declarations.toSet()
|
||||||
proto.declarationList
|
proto.declarationList
|
||||||
.filterNot { isSkippableFakeOverride(it, this) }
|
.filterNot { isSkippableFakeOverride(it, this) }
|
||||||
.mapNotNullTo(declarations) { declProto -> deserializeDeclaration(declProto) }
|
// On JVM, deserialization may fill bodies of existing declarations, so avoid adding duplicates.
|
||||||
|
.mapNotNullTo(declarations) { declProto -> deserializeDeclaration(declProto).takeIf { it !in oldDeclarations } }
|
||||||
}
|
}
|
||||||
|
|
||||||
thisReceiver = deserializeIrValueParameter(proto.thisReceiver, -1)
|
thisReceiver = deserializeIrValueParameter(proto.thisReceiver, -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user