[FIR] hacky fix lazy resolve contract violation for deprecation of enum entries

Enum entries can be used as types in Kotlin (even it's a compilation error)
To use the classifier as a type, we need to find if it's hidden or not.
The deprecations for classes are calculated on COMPILER_REQUIRED_ANNOTATION phase, and that's okay as it goes before the TYPES phase.
For enum entries, the deprecations are calculated on TYPES phase which goes on TYPES phase.
This is incorrect as we cannot jump from lower phase to upper phase

The hack ignores such deprecation search for enum entires.

Test: org.jetbrains.kotlin.analysis.low.level.api.fir.diagnostic.compiler.based.LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.Tests.testEnumEntryAsType

^KT-57648
^KT-56543
This commit is contained in:
Dmitrii Gridin
2023-04-03 19:17:33 +02:00
committed by Space Team
parent 7e380e7df5
commit 093695962a
4 changed files with 9 additions and 4 deletions
@@ -1,4 +1,3 @@
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
// FIR_IDENTICAL
enum class E {
ENTRY