This makes `.originalElements` calls redundant, no need to filter duplicates.
Additionally, it ensures that ktDeclaration's are from cls,
so all types are fully qualified and stubs contain all additional information,
required to build resolved fir e.g.,
fully qualified names are split as classIds, flexible types, etc
Merge-request: KT-MR-10449
Merged-by: Anna Kozlova <Anna.Kozlova@jetbrains.com>
The original problem was the KT-58194 where JavaElement's were reworked.
The rework changed the signatures of some declarations which were used in the KSP
^KT-59031 fixed
This only applies to JVM and fq-names in declaration references
in IR dumps.
This enables us to run more irText tests on platforms other than JVM
(see KT-58605).
MPP projects import relies that `-Xexplicit-api` flag is present in
DefaultLanguageSettingsBuilder.freeCompilerArgs property to enable
related inspections.
^KT-59063 Fixed
these synthetic classes are found by `FirBuiltinSyntheticFunctionInterfaceProvider`,
which isn't based on stubs and has no explicit source
This fixes tests in IJ repo, such as uast based tests:
`FirLegacyUastResolveEverythingTestGenerated#testLambdaReturn`
Merge-request: KT-MR-10406
Merged-by: Anna Kozlova <Anna.Kozlova@jetbrains.com>
e.g. if ast is loaded then no stub is attached to a file
but building deserialized fir can require information from enriched cls stub,
otherwise part of the information would be missed, e.g. contracts.
presumably, this can happen only after decompiled code is opened in the editor
(also meaning no source code is attached to the library),
green stub should exist until GCed,
thus performance degradation in the common case is not expected
Because the overload has a meaningful implementation only in JVM.
In other platforms the specified lock object is ignored.
In K/N it throws UnsupportedOperationException.
Use a newer version of the compiler with changes to archive name
(contains arch). Also, remove obsolete test for the old version.
Merge-request: KT-MR-10399
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
Apparently users are using these constants in their build script
configurations. Until we will provide proper public API we should keep
such constants as public.
^KT-58916 Fixed
If the found index is odd, retry search from index + 1.
Merge-request: KT-MR-10364
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
Previous approach prevented double registration of the plugins, but
might have caused a race condition: atomic flag was set before the
plugins initialization, not after, so another thread could see garbage
data even if it could read the flag set to "true".
This might or might not be a root cause for the KTIJ-24983 exception,
so we'll have to wait for some time before actually closing the issue.
^KT-58985 Fixed
Review: https://jetbrains.team/p/kt/reviews/10385
`isData` returns `true` for `data object`s even if kotlin-reflect
version is old (1.2.0), so it looks like we got correct `KClass.isData`
behaviour for "free". That's why this behaviour was never covered with
tests.
This commit updates the documentation and covers the behaviour described
in the KDoc with tests.
Fixes #KT-58918
If the serializable class contains itself as a generic parameter of the property, and its serializer is not an object (for example, for a sealed class), in this case there is a race in the initialization of the serializer and child serializers.
Merge-request: KT-MR-10363
Merged-by: Sergey Shanshin <Sergey.Shanshin@jetbrains.com>
According to
`FirNativeCodegenBoxTestGenerated.testNestedClassesInAnnotations`,
the annotation
`kotlin.internal.PlatformDependent` is
unresolved reference.
^KT-58549 Fixed