This is the case when we have Java class in hierarchy. In this case,
we want to generate reflective access to the original Java method.
#KT-63642 Fixed
When compiling code fragment, we forbid to use `irLinker` as
IR provider. Because of that, if there are some plugin
extensions, we will not be able to find deserializer
for a given module and will fail.
#KT-63695 Fixed
As a file annotation container is required for resolution,
it should be closer to the resolution logic. Now only LLFirTargetResolver
will operate this logic, so we can change the logic in the future without
a big refactoring.
E.g., as the next step, this resolution can be integrated to the file
^KT-63042
This entry point is required to be able to pre-resolve dependency
declarations.
E.g., fake override declaration shares annotation instances between
the original and the fake one, so we should resolve the original
firstly to avoid concurrent modification and correct context.
This will be done later.
This commit effectively only drops body resolution for a file annotation
container if the target element is not a file because this
is not required for correct resolution
^KT-63042
To make it possible to change nullability of IrCapturedType and change
its annotations, which is happening when determining overridability of
functions via IR.
#KT-63437 Fixed
IrCapturedType (which is a IrSimpleType) does not have variance, so it
is confusing to have it in IrSimpleTypeBuilder, and it's clearer to
construct type projection separately anyway.
- use identity in equals/hashCode. It was already effectively working
like this because of `constructor === other.constructor`
- implement variance and declare it in IrSimpleType
- remove obsolete TODO
- simplify code in captureFromArguments
- use data objects
getServiceIfCreated doesn't create a service instance if id wasn't
created before. There are no other service requests for
KotlinLabelProviderService, so it was not used for file types.
KTIJ-27755
To support configuring free compiler arguments for all shared source
sets (KT-61573), we restore 'compilerOptions { }' DSL in the
multiplatform extension.
To avoid user confusion on accidentally using 'compilerOptions {}'
inside Kotlin targets and Kotlin compilations DSL, similar methods with
ERROR deprecation level were added into `KotlinTarget` and
`KotlinCompilation` interfaces. Invoking these interfaces will throw
UnsupportedOperationException. Such an approach works both for Kotlin
and Groove Gradle scripts.
^KT-63491 Fixed
- PSI tree change events from the IDE aren't necessarily paired. For
example, when we delete a contract statement via `PsiElement.delete`,
only "after removal" PSI tree change events will be published.
- Previously, the declaration modification service would not see such
contract removal as an out-of-block modification because it didn't see
the already removed contract in the associated function. As there is
no "before removal" event, the service had no chance to discover the
contract removal.
- This fix adds the removed element as a property of `ModificationType`.
While the element will already be removed and its parent will be a
dummy holder, we can still analyze its PSI to determine whether it is
a contract.
^KT-63538 fixed
- The root cause of the exception in KT-62982 is that symbol light
classes are accessed in dumb mode (see KT-63490). Nonetheless, we can
patch the exception by supporting `EnumGeneratedDeclaration` in
`getContainingPsi`.
- To create a symbol from the containing PSI,
`KtFirSymbolContainingDeclarationProvider` will still try and fail to
find the enum class symbol via symbol providers, but it'll fall back
to a designators search in the same `FirFile`, which will find the
symbol without index access (see `findSourceNonLocalFirDeclaration` in
LL API's `declarationUtils.kt`).
^KT-62982 fixed
- This commit rewords the coding conventions around `KtAnalysisSession`
and forbids usage of class context receivers. As explained in the
KDoc, classes opaquely capture their context receivers as properties,
which is a high-risk source of leakage.