KT-56687: Unify handling of EnumEntries.

`supportsEnumEntries` in `EnumCLassLowering` is not really
needed, but it was left just in case.
Both K1 and K2 ensure the feature is
enabled before they generate IR.

`supportsEnumEntries` is not enough, because the frontend will not
generate `entries` if `kotlin.enums.EnumEntries` is not available
(linking against an outdated stdlib is considered a valid use-case).

From the resolution point of view,
it's OK to resolve into `entries` while
the feature is off, because then K1 reports an error on the call site.

^KT-56687 Fixed
^KT-55614 Fixed
This commit is contained in:
Nikolay Lunyak
2023-02-16 13:06:22 +02:00
committed by Space Team
parent bcfafc601e
commit bb368bd191
14 changed files with 164 additions and 18 deletions
@@ -245,6 +245,10 @@ fun deserializeClassToSymbol(
session.deserializedClassConfigurator?.run {
configure(classId)
}
if (!Flags.HAS_ENUM_ENTRIES.get(flags)) {
hasNoEnumEntriesAttr = true
}
}
}