Deserializer: Fix initialization of private top-levels

Consider a file with only private top-level properties compiled into
a klib. If this klib is deserialized with deserializationStrategy.ALL
(e.g. if this library if passed using the -Xinclude flag),
initializers of these properties will not be generated  in a final
binary.

This patch fixes this error by unconditionally adding IrFiles into
deserialization queue if deserializationStrategy.ALL is specified.

Issue #KT-34722 fixed
This commit is contained in:
Ilya Matveev
2019-10-31 16:11:53 +03:00
parent 073578bf1c
commit 955300dd34
@@ -434,6 +434,7 @@ abstract class KotlinIrLinker(
assert(id.isPublic)
moduleDeserializationState.addUniqID(id)
}
moduleDeserializationState.enqueueFile(fileDeserializer)
} else if (deserializationStrategy.explicitlyExported) {
moduleDeserializationState.enqueueFile(fileDeserializer)
}