- `FirJavaClass` gets all its annotations from the Java annotations, so
we can rely on `javaClass.annotations` to determine if any annotations
are present.
- Some completion performance tests (e.g. IntelliJ: "empty place typing
with library cache") spent a considerable amount of time in
`KtFirSymbolProviderByJavaPsi.getNamedClassSymbol`.
- This commit introduces `KtFirPsiJavaClassSymbol`, which implements
many `KtNamedClassOrObjectSymbol` properties with the `PsiClass`
instead of the FIR class. The `FirClassSymbol` is built only when
necessary. This improves performance when no "slow" properties need to
be computed for the symbol.
^KT-56617 fixed
Historically flag was enabled for Gradle projects, but we don't have fir-based JavaTracker for the K2 compiler for now, so we need to use a fallback strategy.
Note: it was disabled for tests with K2
Note2: after adding a fir-based java classes tracker this value should be set to true (KT-57147)
#KT-56886 Fixed
Merge-request: KT-MR-9053
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
During a translation of the code from js() call to statement list,
the compiler folds the code string. For that it uses property bodies.
However the bodies can not be loaded in an incremental rebuild.
The patch uses the backing field initializers of constant properties.
The initializers are always loaded.
^KT-57002 Fixed
Normally, compiled declaration searcher should look up declarations
only inside the session declarations. However, built-ins are treated
as a separate dependency, so '...WithoutDependencies()' functions
return only a part of declarations for the Kotlin standard library.
This commit effectively reverts changes in the previous change
(07fdbeca19).
This commit fixes the rest of failing compiletion tests:
- HighLevelJvmBasicCompletionTestGenerated
- HighLevelMultiFileJvmBasicCompletionTestGenerated
The main motivation is to avoid pollution in autocompletion in IDE, and
avoid clashes for some common names.
A lot of stuff was declared public seemingly by accident. It is only
used, and can only be meaningfully used, from within the psi2ir module.
If an intersection override overrides members A.x, B.x and C.x and
B <: A, then A.x is subsumed by B.x, and we don't add it to the list of
overridden members. This fixes a false-positive MANY_IMPL_MEMBER_NOT_
IMPLEMENTED where an implementation is subsumed by an abstract override.
^KT-57092 Fixed
#KT-57117 fixed
also:
- refactor the position finder (mostly for testability)
- add testing of position finder to the testLightTreeReadLineEndings
- refactor the test for readability
- add mixed line ending scenario
When building the original for a substitution override for a synthetic
property, use the initial setter as fallback when unsubstituting it
returns null. This can happen when a generic class overrides the getter
of a synthetic property of a non-generic class. Then the setter is never
substituted, therefore there is nothing to unsubstitute.
^KT-57168 Fixed