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
When both sides of an equality expression are null or Nothing?, only the
right side is receiving implications within the data-flow. Make sure the
left side has implications add as well. This is important for boolean
conditions when implications from both sides need to be combined.
^KT-63535 Fixed
Assert reasonable compile avoidance when basic changes are made in a
multiplatform project
^Relates to KT-56963
Merge-request: KT-MR-13032
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com>
- `runWriteCommandAction`, which is required for PSI modification
functions like `PsiElement.delete`, must be invoked on the EDT.
However, instead of `runWriteCommandAction` we can use
`runUndoTransparentAction`, which does not need to be run on the EDT
and fulfills the same requirement.
^KT-63560
- We cannot configure the application's write action accessibility on a
per-test basis because (1) the application may be shared across
concurrent tests and (2) the application is usually cached, so the
configuration will be missed entirely.
- There is actually a much easier solution to allow write access
selectively: We can enable it in `runWriteAction` blocks, and keep it
in a thread local to support concurrent test runs. As Analysis API
tests never call `runWriteAction`, there will be no "analyze cannot be
called from a write action" error, and if `analyze` is somehow called
from a write action, it will now be caught.
^KT-63560 fixed
In this commit we now require a class-like symbol
(and not a more general classifier symbol) whenever possible.
Exceptional situation with a type parameter is now handled
in Synthetics.kt
Related to KT-63569
```kotlin
interface A {
fun foo() // (1)
}
interface B : A {
// f/o fun foo() // (2)
}
```
In previous commits it was forgotten to create new FIR declarations for
IR fake-overrides, which led to the situation when `IR lazy functions
of `(1)` and `(2)` both contained fir of function (1) as their base
declaration
It seems this change fixed some cases from KT-42020
For declarations generated by plugins, fir2ir creates special synthetic
FIR files, which are not registered in the regular FirProvider. This
leads to incorrect determination of ir parent for generated declarations,
because `irParent` utility relies on file returned from fir provider
To fix this issue, the new FirProvider for fir2ir is introduced, which
wraps the original provider and allows to register newly created files
Note that this means that it's illegal anymore to use FirProvider from
session anywhere in fir2ir. `firProvider` from `Fir2IrComponents`
should be used instead
Updated tests contain errors which are incompatible with fir2ir conversion
(like `PACKAGE_OR_CLASSIFIER_REDECLARATION` and `EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE`),
so running fir2ir on such code may lead to exceptions
`allowNonCachedDeclarations` mode allows referring source declaration which
does not belong to the set of sources passed to fir2ir (e.g. for debugger
support). So if code refers to such declaration, fir2ir creates symbol
for it but not the IR declaration itself