Remove a bunch of custom logic to determine when a callable reference is
bound or not (and hence mustn't have a receiver). Instead, a helper
extension is introduced to determine when a callable reference is bound
by checking if dispatch/extensionReceiver is not FirNoReceiver and the
referenced member is not static.
#KT-57253 Fixed
Note: here we set sinceVersion = null for this feature.
However, we plan in 1.9.* - 2.0 time frame to solve KT-56377
and to enable this feature in 2.0, the latest in 2.1.
See the comments in the code, but mostly the motivation is that once
it was decided to stick with such a legacy thing as raw types,
we are ok with some corner-cases hacks for them
(if there are not too many of them) and they don't break anything
when there are no raw types in the code.
^KT-56616 Fixed
* Code was moved to utils, but sources are included to the shared
until bootstrap advance.
* Fixed dependencies and set API & LV to 1.4 for the modules used with
Gradle.
Merge-request: KT-MR-9122
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
ABI is a special mode which is used only by the deprecated legacy
implementation of jvm-abi-gen. It is more reliable to use the standard
FULL mode to prevent divergence in behavior from normal compilation.
Creating a ZipFileSystem object is an expensive operation.
A cacheable ZIP file system accessor caches ZipFileSystem
objects and may improve the performance of the in place
metadata reading operations from klibs.
Related to KT-51712
- Instead of extending the API with `typeParameterNames`, this commit
creates a PSI-based Java type parameter symbol similarly to the
PSI-based Java class symbol. Because completion requires only the type
parameter name, this approach works fine, and without exposing an
optimization via the API.
- Instead of spreading `equals` and `hashCode` implementations over
`KtFirNamedClassOrObjectSymbol` and `KtFirPsiJavaClassSymbol`, this
commit introduces a shared base class.
- Some completion tests failed because the `hashCode` of
`KtFirNamedClassOrObjectSymbol` and `KtFirPsiJavaClassSymbol` was
different for symbols which should be equal. Both symbols now use the
`ClassId` hash code.
- `KtFirNamedClassOrObjectSymbol.equals` is now properly symmetric with
`KtFirPsiJavaClassSymbol`.
- `KtFirPsiJavaClassSymbol` now has a definite class ID, which
simplifies its implementation a little. `KtFirPsiJavaClassSymbol`
doesn't support local Java classes by design.
- Most Java classes aren't deprecated. To avoid building `firSymbol`
in such cases, this commit adds a simple heuristic which checks the
class's annotations for the presence of one of the deprecation
annotations recognized by the Kotlin compiler.
- Note that annotations are compared via simple names, so there is a
slight margin of error. However, comparing class IDs is more costly in
my tests, because getting an annotation's class ID is not as cheap as
getting its simple name.