This fixes a false negative NO_ELSE_IN_WHEN in K2 and incidentally
also fixes a false positive NO_ELSE_IN_WHEN in K1 since the fix is in
the common code.
#KT-62491 Fixed
- This change is a prerequisite for allowing combined Java symbol
providers (in LL FIR) to correctly disambiguate classpath order after
getting classes with a combined scope, as the index access of the
combined Java symbol provider is not guaranteed to return the class
that should be first based on the original dependency order. To be
able to disambiguate, a combined Java symbol provider needs access to
all class candidates the index can find.
- `FirJavaFacade.knownClassNamesInPackage` cannot be computed in the IDE
using the current strategy because there are multiple finders and
there is no `CliFinder`. However, the cache was still used, which
caused it to be filled with `null` values and additionally caused
worse performance in `JavaSymbolProvider` due to hash map accesses via
`hasTopLevelClassOf`.
- Rewriting the strategy is non-trivial as additional indices are needed
on the IDE side. See KTIJ-24642.
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`.
For some reason, working without APT requires this call in JavacWrapper.
From the other hand, working without APT does not require
Kotlin class files to be in javac classpath.
Without this commit, Java cannot see Kotlin in some cases
Controversial: probably javac should be able to find Kotlin files
inside its existing tabs without this directory in classpath
Only require implementations to be able to compute the enum class name
and the corresponding entry name. Only this should be necessary to
correctly resolve the argument; the resolvers will find the
corresponding class descriptor if necessary