Before this commit, we copied each type parameter during method
enhancement, while not copying the symbol. This led to symbol clashes
in MPP scenarios and various other problems.
Now we create a fully-functional type parameter copy in enhancement
and perform a substitution of old type parameters with new ones
in receiver type, value parameter types, return type,
and type parameter upper bounds.
#KT-59766 Fixed
#KT-59738 Fixed
This fixes an issue with checking for default values in call resolution
(see FirDefaultParametersResolver) where it is expected that the map
only contains a single compatible entry.
#KT-59613 Fixed
- Actualize muted K2 tests
- Actualize muted K1 tests with module systems because legacy Wasm test
infra had no respect for "// MODULE: ..." test directives
There are some cases for fake-override actualization which become
prohibited in the new expect/actual model, so few tests start to fail,
despite the fact that they are checking entirely different things
This is needed to correctly handle the case, when we have the same java
class in common and platform module. In this scenario we have two
different classes on frontend (because symbol providers are not shared)
and completely different enhanced function in scopes of those classes,
but exactly one IrClass for those classes, which is cached during
conversion of common module together with cache of its fake overrides.
So using FirDeclaration as a key to FO cache leads to the problem, when
we can not find cached value for platform module, because it has different
fir declarations for the same real decalration
^KT-58030 Fixed
It is not supposed to work with K1 on Native due to test infrastructure
limitations, and actually fails in one of the compilation modes in
nightly tests.
Overriding equals, hashCode, toString and any other member that is not
expect does not require satisfying the rules of expect-actual matching.
#KT-57381 Fixed
This change allows to revert adding `WITH_STDLIB` directive
to tests which happened at `a9343aeb`.
Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
It's not possible to unmute some tests for K2 because it causes testData structure changing
If change testData, NATIVE doesn't work even with `IGNORE_BACKEND`
This inconsistency is present due to not using the `// WITH_STDLIB`
in the above tests. When K1 creates the enum, it tries to generate
`entries()`, and for that it tries to load `kotlin.enums.EnumEntries`,
but this is actually an unresolved reference. K1 silently swallows it,
and proceeds.
The reason K2 doesn't fail is that in order to generate `entries()` it
simply creates the necessary `ConeClassLikeType` with the desired
`classId` instead of loading the whole `ClassDescriptor`.
The reason we can still observe `$ENTRIES` and `$entries` in K1
is because they are generated during the JVM codegen, and it
only checks if the `EnumEntries` language feature is supported. It
doesn't check if the `entries` property has really existed in IR
(by this time it's expected to have already been lowered to the
`get-entries` function - that's why "has ... existed").
The reason why the codegen doesn't fail when working with
`kotlin.enums.EnumEntries` is because it creates its
own `IrClassSymbol`.
^KT-55840 Fixed
Merge-request: KT-MR-8727
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
- The fix for KT-55570 caused some backend tests to fail, because errors
are now correctly reported for simple classes and actual/expect in
the same module is not supported in FIR. See KT-55177.
- The commit also adds separate tests for K2. Unfortunately, these have
to be disabled for K1 because K1 then reports "expect without actual"
errors.