This is needed because in case a static member is inherited via a Kotlin
class (class C in the newly added test), its origin becomes
FAKE_OVERRIDE which is technically not Java anymore. After this change,
we'll build fake overrides for static members from superclasses
regardless of whether they come from Java or Kotlin.
Also, move the previous logic of
isOverridableFunction/isOverridableProperty to the only call site at
IdSignatureFactory.
#KT-65589 Fixed
Change the package name for all *.kt files inside
the :tools:kotlinp-jvm subproject from "org.jetbrains.kotlin.kotlinp"
to "org.jetbrains.kotlin.kotlinp.jvm"
^KT-62340
The "common" subproject keeps only backend-neutral logic and depends
only on :kotlinx-metadata library. It takes the name of the former
project - :tools:kotlinp
The "jvm" subproject depends on the "common" one and also depends
on :kotlinx-metadata-jvm. It gets the new name - :tools:kotlinp-jvm
There is a lot of touched files in this commit. The majority of them
is just moved files (tests, test data, etc).
Only the following files were actually modified:
.space/CODEOWNERS
build.gradle.kts
libraries/tools/abi-comparator/build.gradle.kts
libraries/tools/kotlinp/build.gradle.kts
libraries/tools/kotlinp/jvm/build.gradle.kts
plugins/kapt3/kapt3-compiler/build.gradle.kts
settings.gradle
^KT-62340
This refactoring includes the following:
1. Separate backend-neutral part of the metadata printer `Kotlinp`
from the part that accesses JVM-specifics: `JvmKotlinp`.
2. Introduce `org.jetbrains.kotlin.kotlinp.Printer`: The component
that renders both individual `Km*` nodes and the whole metadata
tree, and does so with the proper indentation.
^KT-62340
- To avoid recursive updates, we can create sessions which cannot be
created in isolation outside `computeIfAbsent`. Note that this is the
current behavior of the default implementation of
`ConcurrentMap.computeIfAbsent`, which will be replaced soon with
the stricter behavior of `CleanableSoftValueCache` (see KT-61222).
^KT-65683 fixed
We shouldn't trigger declaration processing if we want to check just
annotations/package/imports.
But currently, we still will iterate over the entire file
if there is an element somewhere inside package/import
(see `fileImportInside.kt` test case)
^KT-65344
^KT-65560 Fixed
It is better to explicitly say that we shouldn't do anything in the
case of the file. It worked before because of `needResolveMembers == false`
and `needResolveNestedClassifiers == false` inside
`LLFirStatusTargetResolver.Transformer`
^KT-65344
Now we can resolve this generated property in the same way
as other regular properties.
This is the pre-step for independent script initializers
^KT-65344
^KT-65523
After the previous commit, it is possible to rebuild initializer for
`result$$` property without a full script creation.
Also, this commit fixes anchor symbol for annotations
inside script statements
^KT-65344
We should use the source from replaced `FirAnonymousInitializer` as it
is more equivalent. Another point – the previous implementation
duplicated the source between generated FirProperty and initializer
^KT-65344
Intersections for interfaces and generic interfaces work differently.
`FirIntersectionCallableSymbol.getNonSubsumedOverriddenSymbols()`
does not retrieve the original symbol for a symbol inherited from
generic interfaces.
The patch explicitly obtains original symbols if they exist.
^KT-65216 Fixed
PendingDiagnosticsCollectorWithSuppress is a special diagnostic collector,
which aggregates diagnostics reported during checking of some specific
element before actually reporting them, so its workflow looks like this:
- start checking some element;
- all reported diagnostics go to `pendingDiagnosticsByFilePath` map;
- all checkers done their jobs;
- diagnostics from `pendingDiagnosticsByFilePath` go to the resulting map
of all diagnostics (not all, only ones which lay inside the checked
according to PSI);
- processed diagnostics removed from `pendingDiagnosticsByFilePath`
This approach works fine, but there was one problem with it:
`pendingDiagnosticsByFilePath` is not just a list of diagnostic, but
map of lists, grouped by the containing file. And only those lists
actually get cleared. But if some list was completely emptied, it still
remained in the original `pendingDiagnosticsByFilePath` map
This led to the performance problem in case, where there are no actual
diagnostics in the `pendingDiagnosticsByFilePath`, but the map itself
is not empty but full of empty lists. So collector iterated over this
map on each visiting of each element
And after KT-58881 this problem was uncovered, as number of visits of
elements was twiced (because now we iterate over the whole tree twice,
with Common and Platform checkers)
The fix is quite trivial -- if some list in `pendingDiagnosticsByFilePath`
becomes empty, remove it from the map
^KT-65579 Fixed
The Firebase TestLab requires those properties to be present,
otherwise fails with verification errors.
These properties are specific to the Xcode installation or
toolchain used, and should be retrieved from it, not hardcoded.
See also KT-65601.
Part of the ^KT-58928
Merge-request: KT-MR-13964
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>