KT-41346 Implement NoReorderImplementation without reordering

- See the documentation for `DeserializedMemberScopeHelper` for the full
info about the fix and the issue
- Add `preserveDeclarationsOrdering` setting to
`DeserializationConfiguration`
- Enable this setting in `DeserializerForClassfileDecompiler`
- Also, use `List` instead of `Collection` to pass members to
`DeserializedMemberScope`. It is done to emphasize that the order of
the members is important and may be used
- Review: https://jetbrains.team/p/kt/review/1627
- ^KT-41346 Fixed
This commit is contained in:
Roman Golyshev
2020-09-18 14:19:04 +03:00
parent bf371ff98a
commit 6d0a5a0bb2
3 changed files with 187 additions and 3 deletions
@@ -57,8 +57,8 @@ class DeserializerForClassfileDecompiler(
BinaryClassAnnotationAndConstantLoaderImpl(moduleDescriptor, notFoundClasses, storageManager, classFinder)
val configuration = object : DeserializationConfiguration {
override val readDeserializedContracts: Boolean
get() = true
override val readDeserializedContracts: Boolean = true
override val preserveDeclarationsOrdering: Boolean = true
}
deserializationComponents = DeserializationComponents(