`knownVariables` can't be moved to the outer
function, because it's specific to the current
path: we want to check that the contract
condition is approved along the current path.
For example, in the
`FirPsiDiagnosticTestGenerated.testPropertyGetter`
test when analyzing the function, we want
to check if we can derive the `d1 == Any`
type statement (where `d1` is the receiver).
If we can't, the flow won't contain `d1`
among `knownVariables`
- `getConstructorKeyword` forces an AST load due to a child search. In
most cases, we don't need to check the constructor keyword in primary
constructors at all (e.g. `class ABC()` with an implicit primary
constructor). The keyword check is only needed when there are primary
constructor modifiers (e.g. `class ABC constructor()`).
Thanks to Dima Gridin for the suggested fix.
^KT-61635 fixed
This commit optimizes functions related to method signature mapping on
the JVM backend. The most significant change is avoiding re-allocations
in StringBuilder when building internal names. The commit also includes
minor optimizations, such as removing redundant allocations of strings
and other objects.
- Hide allocator-specific data into Allocator::*::Impl
like with gc and gcScheduler modules.
- These *::Impl are still owned by specific GCs
- Additionally moved "stateless" allocator APIs into Allocator.hpp
Leave only bootstrap range again
This commits reverts da267ba2c8. It looks
like JPS import is possible without additional regular expressions. Also,
origin commit added too wide range of trusted versions.
KTI-1359
`KtReference` might be resolved from anywhere, even
from the write action - the call site might not know
anything about Kotlin, and might not be able to
somehow prevent the `inaccessible analysis session`
exception from being thrown. That's why we
have to be permissive here.
^KTIJ-26867 Fixed
Currently, KAPT3 uses JDK internal API to build Java AST.
Since the API is internal, it has changed in newer JDKs.
So, for them, use reflection to access new API.
#KT-59349 Fixed
It would be nice to report more appropriate diagnostics at the
corresponding places, but right now it's more important to
fix greenness-redness problems. Plus, this is already how K1 works.
^KT-59900 Fixed