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.
Some boolean expressions could be transformed into `IrWhen`
node. To understand that this node is actually
a boolean expression, we need to analyze its origin.
#KT-62683
We should grab static scope before in the same way as scopesBefore
to not get already updated static scope with nested scopes.
Also, we should restore such "before" snapshots to avoid their modification
(this can be reproduced with in the next commit)
^KT-63042
We are resolving delegated constructor call in the wrong context
```
TYPES:
FILE: [ResolvedTo(IMPORTS)] superTypeCallNameClash.kt
public? open [ResolvedTo(SUPER_TYPES)] class Base : R|kotlin/Any|
public? final? [ResolvedTo(TYPES)] class MyClass : R|second/Base| {
public? [ResolvedTo(TYPES)] [ContainingClassKey=MyClass] constructor(): R|second/MyClass| {
LAZY_super<R|second/MyClass.Base|> // should be R|second/Base|
}
public? open [ResolvedTo(RAW_FIR)] class Base : R|kotlin/Any|
}
```
^KT-63042
This commit does two things:
- Reorders methods so that after we enable auto-generation the git diff
is clearer
- Adds explicit return types to all `IrElementTransformerVoid` methods
for the same purpose
No semantic changes in this commit.
The test allocates a lot of memory and can cause OOM-killer on Linux
with 16 Gb RAM or less kill Gradle daemon.
Merge-request: KT-MR-13131
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
Fix swiftc path in the performance infrastructure. It has a separate
plugin to regular native-build-tools.
This fixes failures caused by the 3aeca1956e.
See also MR-KT-12948
Merge-request: KT-MR-13130
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
This property allows changing log level for message printing the final
set of compiler arguments used to run compilation.
Possible levels are 'error', 'warning', 'info', 'debug'. Default level
is 'debug'.
^KT-60733 Fixed
At the moment, there is no good way to meaningfully filter `this`
expressions. The filters for the reference shortener can work only with
symbols, and it does not make a lot of sense to check any particular
symbol when deciding whether to shorten a labeled `this` expression.
We would probably need a better API for the shortener to be able
to filter more precisely (see KT-63555)
^KT-62675 Fixed