All the other annotation classes has abstract modifier.
All nested interfaces has static modifiers.
This commit is not so important for compiler, but it is matter for IDE,
because when we load classes in IDE via
KtLightClassForDecompiledDeclaration -- there are Abstract and Static
on the Container class
FIR LC has a different abstraction, so using the specific class name is
literally too specific to FE 1.0 LC.
We could introduce a common interface for those, but checking
`kotlinOrigin` is good enough, and thus type-checking their common
ancestor is good enough too.
enum class, which is extended by enum entries, should not be final.
(Those enum entries should be, instead.)
enum class itself wouldn't be instantiated, and thus it's technically
abstract, but having a private ctor() would be an option.
For the latter case, we can simply put no modality modifier.
Example of such class declaration would be `10 < class A` expression
The expression is uncompilable, but parsable. Unfortunately, the
FIR compiler does not save `class A` reference in it (because it
is not an expression, and only an expression can be a LHS or RHS of
binary expression `10 < ...`)
When we try to build light classes, we will try to find/build FIR
declaration for this class, but we won't be able to, and this will throw
an error
Adding this check should fix few
`FirKotlinHighlightingPassTestGenerated$Regression` tests
Even if origins are same, wrapped light elements are not equivalent.
Revealed by running bunch of JavaAgainstKotlinBinariesCheckerTestGenerated
tests.
com.intellij.testFramework.LoggedErrorProcessor$TestLoggerAssertionError: Non-idempotent computation:
it returns different results when invoked multiple times or on different threads:
KtLightMethodForDecompiledDeclaration of KtLightClassForDecompiledDeclaration of PsiFile:A.class != KtLightMethodForDecompiledDeclaration of KtLightClassForDecompiledDeclaration of PsiFile:A.class
KtUltraLightFieldForSourceDeclaration implements PsiField, for which
getNameIdentifier() is marked @NonNull, so some clients expect a
non-null return value.
#KT-45629 Fixed
Using "JVM_1_8" always resulted in incorrect mapping of Kotlin
annotation targets to Java element types.
The change in AbstractKotlinRenderLogTest is needed because while
CliTraceHolder.module is technically a descriptor leak, it was never
detected by this test accidentally, because of the depth cutoff equal to
10, which started to not be enough after the minor refactoring of
replacing `Delegates.notNull` with `lateinit`.