Commit Graph

99385 Commits

Author SHA1 Message Date
Roman Golyshev ff7c095fb3 [FIR][Serialization] Use resolvedCompilerAnnotationsWithClassIds to avoid recursive resolve
`resolvedAnnotationsWithClassIds` requires resolve to TYPES phase,
which is unavailable during compiler plugins stages. Trying to resolve
to that phases will cause an infinite recursive resolve loop

Also, call `resolvedAnnotationsWithArguments` only when
`neededArguments` is true

^KTIJ-24893 Fixed
2023-03-13 17:05:26 +00:00
Nikolay Lunyak 5505fd207e [FIR] KT-57195: Don't approximate ft when checking override return types
Why does this check even exist? K1 doesn't do it.

^KT-57195 Fixed
2023-03-13 16:34:47 +00:00
Nikolay Lunyak b385d787cc [FIR JS] KT-57200: Allow dynamic varargs
^KT-57200 Fixed
2023-03-13 15:54:52 +00:00
Pavel Kirpichenkov 5d664aac92 [MPP] Disable KGP import for the standalone kotlin-js Gradle plugin
KTIJ-24745
2023-03-13 14:26:39 +00:00
Pavel Kirpichenkov 93fc9097c8 Minor: add explicit MutableMap type annotation to workaround KTIJ-21172 2023-03-13 14:26:39 +00:00
Bogdan Mukvich 24d4f186ba [Gradle, JS] Fix pom.xml publication to OSS sonatype 2023-03-13 14:25:52 +00:00
Svyatoslav Kuzmich a99ea1d3ce [Wasm] Support enumValues and enumValueOf functions
^KT-57276 Fixed

Merge-request: KT-MR-9169
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2023-03-13 14:13:31 +00:00
Ilya Goncharov bcf7c38288 [Gradle, JS] Add root cache directory changing to test 2023-03-13 14:02:27 +00:00
mcpiroman d87468ef39 Simplify and optimize JvmLateinitLowering 2023-03-13 14:58:28 +01:00
Svyatoslav Scherbina 8315eeaf92 [K2/N] adjust interop_objc_direct test for K2 because of ^KT-55902
K2 doesn't support implicit integer coercion for cinterop yet.
2023-03-13 13:39:51 +00:00
Svyatoslav Scherbina 950c2baa34 [K2/N] ignore library_ir_provider_mismatch test because of ^KT-56855
K2 doesn't support one-stage compilation mode for Native yet.
2023-03-13 13:39:51 +00:00
Svyatoslav Scherbina 424fd19fb4 [K2/N] ignore interop_kt40426 test because of ^KT-56030
K2 doesn't support subclassing Obj-C classes with methods differing only
by parameter names yet.
2023-03-13 13:39:50 +00:00
Evgeniy.Zhelenskiy 888bf801e2 [FIR] Forbid @JvmInline with inline modifier
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2023-03-13 13:09:57 +00:00
Evgeniy.Zhelenskiy 3b5ad0681f [IR] Fix compiler bugs with MFVC to let KorGE run
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2023-03-13 13:09:56 +00:00
Evgeniy.Zhelenskiy 9b3fc34f78 [IR] Add for statement to tests for MFVC returning from inline functions
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2023-03-13 13:09:56 +00:00
Evgeniy.Zhelenskiy 19424702e0 [IR] Fix mutable shared reference of MFVC type
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2023-03-13 13:09:55 +00:00
Pavel Punegov 752d6505e9 [K/N][test] Opt-in ImplicitSignedToUnsignedIntegerConversion in tests
Add option to allow such conversions, see ^KT-56583

Merge-request: KT-MR-9160
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-03-13 13:00:19 +00:00
Pavel Mikhailovskii e9130f5c87 Fix test directives 2023-03-13 13:57:59 +01:00
Alexander Udalov 4f380e876c Deprecate ClassBuilderInterceptorExtension
ClassGeneratorExtension is supposed to be used instead.
2023-03-13 13:54:06 +01:00
Alexander Udalov 163a052f98 Remove old JVM backend implementation of Parcelize
There's no way for the end user to use this implementation anymore,
since old JVM backend cannot be enabled, and nothing else from Kotlin
depends on it.
2023-03-13 13:53:08 +01:00
Alexander Udalov f4b4922a13 Use new ClassGeneratorExtension EP in jvm-abi-gen 2023-03-13 13:53:07 +01:00
Alexander Udalov fba5b96bef JVM IR: introduce ClassGeneratorExtension
This is a low-level extension point for Kotlin/JVM, which is supposed to
be used instead of ClassBuilderInterceptorExtension.

 #KT-54758 Fixed
 #KT-56814 Fixed
2023-03-13 13:51:52 +01:00
Alexander Udalov b1ca9a0f05 JVM IR: extract JvmIrDeclarationOrigin 2023-03-13 13:51:52 +01:00
Alexander Udalov b1d109e7a3 JVM IR: do not use JvmDeclarationOrigin in duplicate signatures
Apparently the client code which reports errors only meaningfully uses
the `descriptor` field of `JvmDeclarationOrigin` in case of JVM IR.
2023-03-13 13:51:52 +01:00
Pavel Mikhailovskii 00fff3de72 Skip a failing IDE test 2023-03-13 11:37:31 +01:00
Kirill Rakhman 9f33c64715 [FIR] Remove duplicate FirCallableSymbol.isStatic extension 2023-03-13 08:48:39 +00:00
Kirill Rakhman b476eee6e3 [FIR2IR] Simplify generation of bound callable reference receivers
Remove a bunch of custom logic to determine when a callable reference is
bound or not (and hence mustn't have a receiver). Instead, a helper
extension is introduced to determine when a callable reference is bound
by checking if dispatch/extensionReceiver is not FirNoReceiver and the
referenced member is not static.

#KT-57253 Fixed
2023-03-13 08:48:39 +00:00
Mikhail Glukhikh a3f0e429e3 K2: report empty intersection warnings from completion properly 2023-03-11 10:15:25 +00:00
Mikhail Glukhikh 47fab61716 FE: introduce AllowEmptyIntersectionsInResultTypeResolver feature
Related to KT-51221
2023-03-11 10:15:24 +00:00
Mikhail Glukhikh fbea09b3b6 K2 tests: always use language version 2.0 or higher 2023-03-11 10:15:24 +00:00
Mikhail Glukhikh d9a6cad5ab Disable ForbidInferringTypeVariablesIntoEmptyIntersection in some FE tests 2023-03-11 10:15:23 +00:00
Mikhail Glukhikh b64cb67370 K2: support ForbidInferringTypeVariablesIntoEmptyIntersection on/off 2023-03-11 10:15:23 +00:00
Mikhail Glukhikh f7544aff62 Delay ForbidInferringTypeVariablesIntoEmptyIntersection to 2.*
Note: here we set sinceVersion = null for this feature.
However, we plan in 1.9.* - 2.0 time frame to solve KT-56377
and to enable this feature in 2.0, the latest in 2.1.
2023-03-11 10:15:22 +00:00
Denis.Zharkov a3dcc2032f Drop RawTypeMarker as it's effectively unused anymore
See the previous commits
2023-03-10 18:35:01 +00:00
Denis.Zharkov 608cb01935 K2: Imitate K1 behavior for case of captured types with a raw supertype
See the comments in the code, but mostly the motivation is that once
it was decided to stick with such a legacy thing as raw types,
we are ok with some corner-cases hacks for them
(if there are not too many of them) and they don't break anything
when there are no raw types in the code.

^KT-56616 Fixed
2023-03-10 18:35:01 +00:00
Denis.Zharkov eb09a25239 TypeSystemContext: Rework raw types processing
All the current usages are about checking if the type is raw,
also in K2 it is simply incorrect to assume that only flexible types
might be raw
2023-03-10 18:35:00 +00:00
Alexander Udalov b6e59fe8fd Remove dependency of low-level-api-fir on psi2ir
Fix behavior of getPsiAsFirElementSource; previously expression was not
being fully deparenthesized.
2023-03-10 17:49:35 +00:00
Alexander Udalov d96112b944 Remove dependency of fir2ir/fir.entrypoint on psi2ir 2023-03-10 17:49:35 +00:00
Nikolay Lunyak 4b8471d806 [FIR] KT-57247: Expand typealiases in annotation vararg arguments
^KT-57247 Fixed
2023-03-10 17:29:37 +00:00
Stanislav Ruban 5b0b7c4da4 KT-57206: Add diagnostics test
Problem described in KT-57206 seems to have been fixed by KT-56506. This
 commit adds code example from KT-57206 as a diagnostics test.

^KT-57206 Fixed
2023-03-10 14:03:43 +00:00
Svyatoslav Kuzmich 1603cd11ea [Wasm] Use jsshell version in zip and directory names
Otherwise, it wouldn't rerun the task when downloading new version
2023-03-10 14:03:26 +00:00
Svyatoslav Scherbina 60b8d2b3d9 [K/N] Disable more failing tests on mips, target is deprecated 2023-03-10 13:25:53 +00:00
Nikolay Krasko 57934a6870 Revert "Revert "[K2/N] KT-57026, KT-57208: Adjust Native & JS test infrastructures for MPP testing""
This reverts commit c0c692844e.
2023-03-10 14:24:49 +01:00
Vladimir Sukharev 65276e5960 [Testsystem] Insert missing opt-in
Merge-request: KT-MR-9158
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-03-10 13:17:37 +00:00
Nikolay Krasko c0c692844e Revert "[K2/N] KT-57026, KT-57208: Adjust Native & JS test infrastructures for MPP testing"
This reverts commit 6964121c15.
2023-03-10 13:14:10 +00:00
Pavel Punegov aed6272107 [K/N] Merge :kotlin-native-shared with :native:kotlin-native-utils
* Code was moved to utils, but sources are included to the shared
until bootstrap advance.
* Fixed dependencies and set API & LV to 1.4 for the modules used with
Gradle.

Merge-request: KT-MR-9122
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-03-10 12:57:35 +00:00
Artem Kobzar 633d840c88 [K/JS] Deprecate external enum declarations
^KT-57254 Fixed
2023-03-10 12:55:43 +00:00
Alexander Udalov 6595275ba7 Remove ClassBuilderMode.ABI
It was a special mode used only by the removed legacy implementation of
jvm-abi-gen.
2023-03-10 12:24:50 +00:00
Alexander Udalov 9f269b83aa Remove "legacy" mode of jvm-abi-gen plugin
#KT-55375 Fixed
2023-03-10 12:24:50 +00:00
Alexander Udalov 77c68fc809 FIR: use ClassBuilderMode.FULL in FirMetadataSerializer
ABI is a special mode which is used only by the deprecated legacy
implementation of jvm-abi-gen. It is more reliable to use the standard
FULL mode to prevent divergence in behavior from normal compilation.
2023-03-10 12:24:49 +00:00