Commit Graph

94299 Commits

Author SHA1 Message Date
Kristoffer Andersen bc9db58b3c [AA] Rename getElementOfTyp_e_AtCaret 2022-08-15 23:32:33 +02:00
Igor Chevdar f4cf2757e6 [K/N][IR] Moved EnumsSupport to corresponding lowering 2022-08-15 18:00:32 +00:00
Igor Chevdar 0ea8fc5b08 [K/N][IR] Refactored enums lowering 2022-08-15 18:00:31 +00:00
Vladimir Sukharev f4c5f5d8eb Fix filecheck for Objective-C targets
Merge-request: KT-MR-6854
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-08-15 15:11:52 +00:00
Nikolay Krasko ab3d3edb2b Fix write-verification-metadata instruction 2022-08-15 12:18:13 +00:00
Nikolay Krasko 48e8c0020d Update dokka to 1.7.0
This should fix reproducibility
(https://youtrack.jetbrains.com/issue/KT-52069/Dokka-resulting-htmls-are-not-stable)

^KTI-893 Fixed
2022-08-15 12:18:12 +00:00
Dmitry Gridin c9e9ee90a3 [analysis] remove redundant OptIn annotations 2022-08-15 11:04:59 +02:00
Dmitry Gridin 8dbdea39da [analysis] remove redundant diagnostic suppression 2022-08-15 11:04:58 +02:00
Dmitry Gridin 6a83bcf349 [lc] reformat KotlinAsJavaSupport
^KT-53543
2022-08-15 11:04:31 +02:00
Ilya Goncharov 04b8ece673 [Gradle, JS] Add warning reporting about yarn.lock changes
yarn.lock can be changed during the build. It means that gradle plugin contain new versions of npm dependencies and yarn.lock should be updated to be actual. From the other side, we have bootstrap checks, and before bootstrap update following bootstrap gradle plugin can contain following changes in Gradle plugin, and in bootstrap checks yarn.lock is not actual.
So when we update NPM versions, we get one of following situations: yarn.lock is actual either in ordinary build or in bootstrap one, and never is actual in both situation
2022-08-15 08:19:04 +00:00
Abduqodiri Qurbonzoda eb3bbc3265 Remove "-Xsuppress-deprecated-jvm-target-warning" compiler argument 2022-08-13 01:48:23 +03:00
Abduqodiri Qurbonzoda 983c7adb1e Remove :libraries:tools:stdlib-compiler-classpath project
It was used as a workaround to allow jvmTarget=1.6 in stdlib.
2022-08-13 01:42:43 +03:00
Abduqodiri Qurbonzoda de10a5b8fe Upgrade dex-member-list version to 4.1.1
The old dex-method-list version 3.0.0 used a dalvik-dx that could not
parse MethodType introduced in jvm-7 bytecode.
2022-08-13 01:40:04 +03:00
Abduqodiri Qurbonzoda 0942a414c8 Fix typeAnnotationTarget6.kt codegen box test 2022-08-13 01:33:48 +03:00
Abduqodiri Qurbonzoda cf44753aed Remove :compiler:tests-common-jvm6 project and JvmTarget6OnBaseJvm tests 2022-08-13 01:33:48 +03:00
Abduqodiri Qurbonzoda de775ad728 Remove unsignedIntCompare_before.kt test data 2022-08-13 01:33:47 +03:00
Abduqodiri Qurbonzoda 34e50649e8 Switch JVM target of the standard libraries to 1.8 #KT-51907 2022-08-13 01:33:45 +03:00
Ilya Goncharov 54980ce0d5 [Gradle, JS] Remove redunddant mismatch report kind 2022-08-12 16:58:57 +02:00
Vsevolod Tolstopyatov e32e5c26a4 [reflect] Fix flaky tests that depend on Reflection.clearCaches()
* Use ReflectionFactoryImpl as single point of synchronization
* Synchronize all cache-sensitive tests on it in order to be robust in parallel test runners
* Remove redundant cache clear after each test

Merge-request: KT-MR-6842
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2022-08-12 14:10:08 +00:00
Jiaxiang Chen 94abeb64c5 use top level classId for looking up java classes in KotlinCliJavaFileManagerImpl 2022-08-12 14:24:13 +02:00
Anton Lakotka 3eb0868d5b [Gradle] Propagate user-defined attributes to Java Configurations
Java Compilation classpath should have the same user-defined attributes
as Kotlin Compilation.
This also prevents from Gradle variant resolution failures on
Java Configurations in case if user-defined attributes
resolve that ambiguity.

^KT-31468 Verification Pending
2022-08-12 12:05:25 +00:00
Anton Lakotka 8bb2fe47f4 [Gradle] Test that no extra attributes are copied to Java Configurations
^KT-31468
2022-08-12 12:05:24 +00:00
Anton Lakotka 8bfe5691e6 [Gradle] Add tests for KT-31468 Targets disambiguation doesn't work if
a depending multiplatform module uses `withJava()` mode

^KT-31468
2022-08-12 12:05:23 +00:00
Dmitry Savvinov 174252f68f [mpp, tests] Add tests for rendering KpmTestCases 2022-08-12 12:34:14 +02:00
Dmitry Savvinov afa9c2f8b9 [mpp, tests] Use JUnit5 in kotlin-project-model tests 2022-08-12 12:34:14 +02:00
Dmitry Savvinov c1e21f5b8f [mpp, tests] Add infrastructure for *Generated KPM Core tests 2022-08-12 12:34:14 +02:00
Dmitry Savvinov 309b2f569d [mpp, tests] Add few simple KpmCoreCases 2022-08-12 12:34:14 +02:00
Dmitry Savvinov a2c9864adc [mpp, tests] Introduce KpmCoreCases infrastructure 2022-08-12 12:34:14 +02:00
Dmitry Savvinov 3bb70f55d7 Minor: add KpmVariant.nativeTarget extension 2022-08-12 12:34:14 +02:00
Dmitry Savvinov 91d64d992f [MPP] Refine enum entries and Enum-type
Enum-type inherits java.io.Serializable on JVM, so it needs
to be refinement ot avoid TYPE_MISMATCH errors.

Note that for the refinement of Enum-type itself it's necessary
to force refinement of enum-entries, otherwise their supertypes
(and Enum-type specifically) won't be touched

Tests are added on IJ side

^KT-53514
2022-08-12 12:25:28 +02:00
Vsevolod Tolstopyatov 22e26d0756 Move EnumEntries LVS to 1.9
* Also cleanup tests to avoid using obsolete WITH_RUNTIME
2022-08-12 09:35:32 +00:00
Mikhail Glukhikh 10ffdab438 Analysis API FIR: fix isDefaultEnumEntryMember 2022-08-12 09:35:31 +00:00
Mikhail Glukhikh 41b73abc49 Analysis API FIR: fix exception in LC support for Enum.entries property 2022-08-12 09:35:30 +00:00
Mikhail Glukhikh d7c0b1b620 PSI2IR: don't create Enum.entries in IR without the corresponding feature 2022-08-12 09:35:29 +00:00
Mikhail Glukhikh 2ba22b9165 FIR2IR: don't create Enum.entries in IR without the corresponding feature 2022-08-12 09:35:28 +00:00
Mikhail Glukhikh 3079be75d4 K2: don't filter Enum.entries depending on language settings 2022-08-12 09:35:28 +00:00
Mikhail Glukhikh 7333589663 K1/K2: add Enum.entries unconditionally and filter them out in tower
Before this commit, we added Enum.entries only in case when
LanguageFeature.EnumEntries was ON (with an exception in K1/Java case).
In this commit we add Enum.entries unconditionally, and in case
the language feature is OFF we filter them out during tower resolve.
2022-08-12 09:35:27 +00:00
Vsevolod Tolstopyatov 0a5b3f1e13 [JVM IR] Adjust testData to address new static Enum.entries member 2022-08-12 09:35:26 +00:00
Vsevolod Tolstopyatov 2fcef7af89 [FIR] Fix IrInlineBodiesHandler
Validate that inline function actually is present in at least on of the
modules, not in all of them. That enables support of MODULE directive
in boxInline tests for FIR.

Also, hide a few minor style fixes in this commit
2022-08-12 09:35:26 +00:00
Mikhail Glukhikh 3a2d69225c K1: add support for Enum.entries in Java scopes 2022-08-12 09:35:25 +00:00
Mikhail Glukhikh 12e8b1d844 K1: add support for Enum.entries synthetic property (see KT-48872)
#KT-53270 Fixed
2022-08-12 09:35:24 +00:00
Vsevolod Tolstopyatov c0f81cbc45 [JVM] Improve code coverage of EntriesMapping
Ensure that when .entries is accessed from an inline function body
or lambda argument, EntriesMapping are properly generated and used
without excessive mappings and duplicated fields

#KT-53236
2022-08-12 09:35:24 +00:00
Vsevolod Tolstopyatov 8a181cf2bd [FIR] Create stub language settings for FIR-related test to keep relying on it
#KT-48872
2022-08-12 09:35:23 +00:00
Vsevolod Tolstopyatov e3bff290bd [JVM] Lower .entries calls on Kotlin enums
Leveraging the same mechanism with $EntriesMapping as Java enums.
Old (compiled with LV/AV < 1.8) enums are detected by looking for
static special <get-entries> method that cannot be introduced on
Kotlin enums otherwise

#KT-53236
2022-08-12 09:35:22 +00:00
Vsevolod Tolstopyatov a12a31ce68 [JVM] Lower .entries calls on Java enums
#KT-53236
2022-08-12 09:35:21 +00:00
Vsevolod Tolstopyatov 2ade189e60 [K/N] Stub for Kotlin/Native
#KT-48872
2022-08-12 09:35:20 +00:00
Vsevolod Tolstopyatov e708809e55 [JVM] Support Enum.entries for enums being compiled with Kotlin 1.8+
#KT-53236
2022-08-12 09:35:20 +00:00
Vsevolod Tolstopyatov 1b6a43ba69 Update IR serialization to reflect changes in IrSyntheticBodyKind for enum entries
#KT-48872
2022-08-12 09:35:19 +00:00
Vsevolod Tolstopyatov 93f17a2b86 [FIR] Support static getters along with fake Enum.entries declaration in FIR
#KT-48872
2022-08-12 09:35:18 +00:00
Ivan Kylchik 45b89de9f4 Optimize ir interpretation of Enum.name
There is no need to create honest object in case of such simple
calculation. Furthermore, it can be harmful if enum class has
non-constant initializer or property.

#KT-53480 Fixed
2022-08-11 18:55:30 +03:00