^KT-59074 Fixed
This solution is not ideal. Ideally, the allopen compiler plugin
shouldn't report `private` properites as `open` KT-64980, but it will
unpredictably break other things.
For some reason, codegen box test was not added in 082c337faa. The main
point of it now is to check that everything works correctly in the
IrFakeOverrideBuilder mode.
Fir-based lazy type alias is required in IR text tests to check that
lazily loaded IR is equivalent to deserialized IR (module bodies)
and does not cause ABI compatibility issues in KLIB-based backends.
^KT-65033
This commit adds support for the Parcelize plugin to generate default
serialization implementation for the kotlin.time.Duration. As Parcelize
already supports serializing some of the kotlin library types it makes
sense to support more common ones for the user convenience.
https://issuetracker.google.com/issues/264614661
Affects IR Evaluator in IDEA.
The problem is happening because
`ReflectiveAccessLowering#fieldLocationAndReceiver` returns the class
the field was called on, not the class the field was declared in.
Then the class is used for obtaining a field by using reflection's
`getDeclaredField` to make the field accessible after.
But `getDeclaredField` doesn't work for field declared in a superclass,
hence the error.
#KT-65012 fixed
Merge-request: KT-MR-13919
Merged-by: Alexander Kuznetsov <Aleksander.Kuznetsov@jetbrains.com>
N.B. This implementation does not 100% prevent conflicts or resolve
alterations when shortening functions.
To guarantee that,
we would need to carefully consider all the references in the file,
and to check whether they have changed their resolve in the presence
of a new import.
This is not trivial and will be approached separately under a different
task.
^KTIJ-27841 Fixed
For the correct work of the compiler, some maps should be fulfilled by the build system. In the first implementation of dumb mode for JPS all maps were disabled. Now flag was introduced to determine IC behavior: to collect data needed for the compiler's code generation and disable maps and IC analysis
^KT-65043 Fixed
This fixes some type argument mismatch errors caused by a captured type
being approximated and then captured again.
Some places need to be adapted to work with captured types that
previously only worked with approximated types.
#KT-62959 Fixed
This is in preparation of a future commit, where captured types won't be
approximated anymore after completion.
Consider a case like
class Box<T>(val value: T)
interface Foo<T> { fun bar() }
fun test(x: Box<out Foo<*>>) {
x.value.bar()
}
The type of `x.value` will be `CapturedType(out Foo<*>)`.
Note that capturing only applies to the top level, i.e., nested
projections are not captured.
That's why it becomes necessary to support capturing of captured types,
otherwise the star projection in `CapturedType(out Foo<*>)` is not
properly captured in the receiver of the call `x.value.bar()`.
#KT-62959
When a custom serializer is specified on a type and this type is used in a property of another serializable class, then on the JVM this leads to an error accessing the custom serializer class - because it is private and located in another package.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2495
Merge-request: KT-MR-12877
Merged-by: Sergei Shanshin <Sergey.Shanshin@jetbrains.com>
This patch should not change any reasonable testing behavior. The only
case when the behavior could be changed is when two different functions
have the same IdSignature, which is a problem on its own.
Required for KT-64809
The inter-module interaction was partially supported, but the
DiagnosticCompilerTestFE10TestdataTestGenerated and
LFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated were
failing. This is because the arguments of annotations were not fully
resolved in loadExperimentalitiesFromAnnotationTo function.
^KT-60262 Fixed
Also introduce `firForVisibilityChecker`.
This way it's easier to use compared to
defining overloads in `FirVisibilityChecker`
that accept symbols.
This change exists, because I wasn't able
to make myself sure that accessing fir here
is safe. We may come here after a typealias
expansion, after all.