Make sure parent field is set for forward declarations.

This commit is contained in:
Alexander Gorshenev
2019-01-28 14:53:53 +03:00
committed by alexander-gorshenev
parent 6b2161b5ec
commit a929dc9c6d
@@ -284,11 +284,13 @@ class KonanIrModuleDeserializer(
classDescriptor,
classDescriptor.modality
) { symbol: IrClassSymbol -> IrClassImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, irrelevantOrigin, symbol) }
.also {
it.parent = file
}
declaration
}
file.declarations.addAll(declarations)
file
}
}
@@ -334,4 +336,4 @@ class KonanIrModuleDeserializer(
val proto = KonanIr.IrModule.parseFrom(byteArray.codedInputStream, KonanSerializerProtocol.extensionRegistry)
return deserializeIrModule(proto, moduleDescriptor, deserializeAllDeclarations)
}
}
}