The `*leaf*` functions were
introduced due to my false
assumption. The normal processing
functions only collect leafs
already. `*leaf*`s are bad, because
they don't cache anything.
The change in
AbstractFirOverrideScope reflects
KT-63290, and is needed to avoid
duplicate `CONFLICTING_OVERLOADS`
and `VIRTUAL_MEMBER_HIDDEN`.
This change improves performance, as
checking callables via scopes in
`4e587157` turns out to be quite
slow, and it also prevents some redundant
diagnostics.
Properties of type dynamic within a data class cause compilation to fail
when converting FIR to IR. This is because dynamic types do not have a
proper backing class for symbol lookup. However, dynamic types can just
be considered of type Any for hashCode calculations.
^KT-63094 Fixed
In case there are Java sources in the module, K2 creates two instances
of `FirModuleDescriptor` with the same name: one for Kotlin sources, one
for Java sources. When building fake overrides in IR, it's important to
understand that those are the same module. Currently it's done by
comparing the names, but in the future it may be improved in KT-62534.
The changed test was in fact unrelated to KT-61805, and the problem
there was rather that no fake override was created for internal property
`schemeState` in `InspectionProfileModifiableModel`.
for `ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT` checker near to
other tests of this diagnostic. It is fine to move it out of
`multiplatformCompositeAnalysis` dir, because, actually, it tests
the case with comparison of FirAnnotationCall and FirAnnotationImpl,
which doesn't require composite analysis mode.
^KT-62559
...`ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT` checker near to
other tests of this diagnostic. This is because now such tests
are run in lazy resolve test suite, so no need to store them
separately.
^KT-62559
It is expected, that in some complex cases
`ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT` reports in .ll.kt disappeared
at all. This is because FIR checker doesn't catch comlex cases,
which are handled by IR checker.
Also add comments about bugs KT-62886 and KT-63382 found by tests.
^KT-62559
New tests are red in current commit!
All `.ll.kt` files are just copies of `.fir.kt` or `.kt`. This will be
fixed in the next commit to clearly show difference between LL and FIR.
The original purpose of this change was to test
`ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT` diagnostic, for which FIR checker
will be run only in IDE (to be changed in next MR), so its reports
a lost from usual KMP tests.
But this looks like a useful change for all KMP tests, not only this
diagnostic.
^KT-62559
We plan to disable computing full mangled names of declarations in all
manglers except the IR mangler (see the subsequent commits).
From now on, in irText tests we dump only the following mangled names:
- Full mangled names computed using the IR mangler
- Signature mangled names computed using the Descriptor mangler
- Signature mangled names computed using the IR mangler
- Signature mangled names computed using the FIR mangler
Here by a full mangled name we mean the mangled name of a declaration
computed using the `MangleMode.FULL` mode. Those mangled names include
the mangled names of the declaration'a parents.
By a signature mangled name we mean the mangled name of a declaration
computed using the `MangleMode.SIGNATURE` mode.
These mangled names are used to compute an `IdSignature` for
the declaration, hence the name.
- While `collectionInitializationInfo` unwrapped a script's top-level
declarations, `check` forgot to do it, so a script effectively had no
top-level properties in the mind of the checker.
^KT-63286 fixed
- The test data is missing initialization checks and will be fixed with
the subsequent commit.
- The test data is originally taken from
`backingField/TopLevelPropertyInitialization` and has been simplified.
- I didn't add `const val` properties to the test data (compared to the
original) due to KT-20110.
^KT-63286