Commit Graph

4 Commits

Author SHA1 Message Date
Alexander Udalov 6e410cb182 Make TypeConstructor.isFinal return false for enums
The reason is that before dc02b2e3ab and 8a0dcca957,
TypeConstructor.isFinal for some class descriptors
(DeserializedClassDescriptor, LazyJavaClassDescriptor,
MutableClassDescriptor) were implemented as `isFinalClass` (which is
`modality == FINAL && kind != ENUM_CLASS`), and all others as
`modality == FINAL` or simply true/false. This led to differences in
behavior depending on the exact instance of the class descriptor.
Now that TypeConstructor.isFinal is always `modality == FINAL`, some
tests (PseudoValueTestGenerated) fail because the finality of some type
constructors changed and these tests render final vs non-final type
constructors differently.

In this commit, TypeConstructor.isFinal is now made to behave safer,
i.e. considering enum class type constructor to be non-final (as was the
case earlier for some ClassDescriptor instances). Some diagnostics might
disappear (e.g. FINAL_UPPER_BOUND) but it doesn't look like a big deal
2017-10-18 12:45:45 +02:00
Mikhail Glukhikh 13e64c18d9 Correct CFA order for enums: first own members, then entries, and at last companion object members #KT-6054 Fixed
(cherry picked from commit 94d3b4c)
2016-08-09 10:28:27 +03:00
Mikhail Glukhikh 35446037bb UNINITIALIZED_ENUM_ENTRY compiler warning introduced #KT-2349 Fixed
(cherry picked from commit 76ac6d1)
2016-08-08 17:47:56 +03:00
Mikhail Glukhikh b7ed68db05 CFA: No more UNRESOLVED_CALL for object / enum entry qualifiers
(cherry picked from commit 4b09de8)
2016-08-08 17:47:40 +03:00