IR: always update deserializedSymbols in referenceLocalIrSymbol

The symbol created in deserializeIrSymbolToDeclare might be discarded
when an existing declaration is used in deserialization (as it happens
when deserializing IR bodies for JVM declarations).
This commit is contained in:
Georgy Bronnikov
2021-07-23 19:06:12 +03:00
committed by TeamCityServer
parent eccbf38061
commit 307de0be89
2 changed files with 2 additions and 2 deletions
@@ -286,7 +286,7 @@ class IrDeclarationDeserializer(
// make sure this symbol is known to linker
symbolDeserializer.referenceLocalIrSymbol(result.symbol, sig)
result.annotations += deserializeAnnotations(proto.base.annotationList)
result.annotations = deserializeAnnotations(proto.base.annotationList)
result.parent = currentParent
return result
}
@@ -73,7 +73,7 @@ class IrSymbolDeserializer(
}
fun referenceLocalIrSymbol(symbol: IrSymbol, signature: IdSignature) {
deserializedSymbols.putIfAbsent(signature, symbol)
deserializedSymbols.put(signature, symbol)
}
fun referenceSimpleFunctionByLocalSignature(idSignature: IdSignature) : IrSimpleFunctionSymbol =