Commit Graph

101791 Commits

Author SHA1 Message Date
Mikhail Glukhikh f48142a6e6 FIR2IR: fix binding of data class generated members
Related to KT-54844
#KT-54952 Fixed
#KT-54887 Fixed
2023-06-14 07:09:15 +00:00
Mikhail Glukhikh 5304afb097 Fix AA/LC behavior accordingly to changes related to KT-54844 2023-06-14 07:09:15 +00:00
Mikhail Glukhikh 2a825f8df1 K2: implement FirClassAnySynthesizedMemberScope #KT-54844 Fixed 2023-06-14 07:09:15 +00:00
Mikhail Glukhikh c898b264ba FIR2IR: fix receiver of value classes method references
This commit fixes the receiver of these method in FIR2IR code
by removing a particular hack.
However, as the consequence of it 2 black box tests become broken in K2.
The reason is KT-54952 which is not yet fixed

Related to KT-54887
2023-06-14 07:09:15 +00:00
Anna Kozlova 95ec7ede66 [light classes] create enum references as PsiReferenceExpressions
Ensure that enum constants with special characters in their names are properly ignored
2023-06-13 20:09:54 +00:00
Timofey Solonin 2353424817 [MPP] Remove obsolete targets from CommonizerIT.commonizeNativeDistributionWithIosLinuxWindows
^KT-58822
2023-06-13 18:31:46 +00:00
Alexander Udalov 82af3dd6ae Tests: fix paths of Java sources in codegen tests
To help them run on the old infrastructure, which light analysis tests
are still using.
2023-06-13 17:48:23 +00:00
Alexander Udalov 23fb96378e Tests: remove duplicate LANGUAGE test directives
To help them run on the old infrastructure, which light analysis tests
are still using.
2023-06-13 17:48:23 +00:00
Alexander Udalov be4df35867 Tests: add FILE directives to some multimodule tests
To help them run on the old infrastructure, which light analysis tests
are still using.
2023-06-13 17:48:23 +00:00
Leonid Startsev 29b6595cfc Start file names with a capital letter according to codestyle
No ABI changes are introduced because file facades are automatically capitalized anyway.
2023-06-13 16:44:13 +00:00
Alexander Udalov 70e9245867 Revert "tmp: implement a hack to fix LA test"
This reverts commit 0387ce0365.

This change was not needed because the 'IGNORE_BACKEND_K1: JVM'
directive makes the test generated as ignored, in this case it is the
method named `ignoreSignedToUnsignedConversions` which is not even
recognized as a test.
2023-06-13 16:19:53 +00:00
Timofey Solonin d7a2e11011 [MPP] Remove obsolete targets from CommonizerHierarchicalIT.commonizeHierarchicallyMultiModule
^KT-58822
2023-06-13 16:04:38 +00:00
Svyatoslav Kuzmich 1dc0b054ed Deprecate PlatformDiagnosticSuppressors::shouldReportUnusedParameter with one parameter 2023-06-13 15:37:54 +00:00
Svyatoslav Kuzmich dc4aa8c15e [Wasm] Restore binary compatibility of PlatformDiagnosticSuppressor
Keep the original shouldReportUnusedParameter method without
 BindingContext parameter

^KT-58188 Fixed
2023-06-13 15:37:53 +00:00
Timofey Solonin e39d9c2c35 [MPP] Remove mingwx86 from CommonizerIT.commonizeMultipleCInteropsWithTests
^KT-58822
2023-06-13 14:53:38 +00:00
Pavel Mikhailovskii 89c8392255 Make it possible to instantiate StandaloneAnalysisAPISession with a custom clasloader 2023-06-13 13:34:11 +00:00
Leonid Startsev 98f7ac044c Add Dokka configuration to kotlinx-metadata-jvm 2023-06-13 12:56:03 +00:00
Leonid Startsev 654874e30f Enhance kotlinx-metadata-jvm KDoc: add missing documentation, apply Grazie suggestions 2023-06-13 12:56:03 +00:00
Leonid Startsev 5088c9370d Add missing deprecation for KmExtensionType and experimentality for KmConstantValue 2023-06-13 12:56:03 +00:00
Anna Kozlova 57f429206c [light classes] Improve isEquivalence checks
^KTIJ-25412

Update equivalence checks for light accessor methods and light fields
 to make them equivalent if they share the same underlying property.
 Follow the `kotlinOrigin` declaration:
 even if there is a property accessor,
 use property declaration.
2023-06-13 12:39:51 +00:00
Dmitrii Krasnov 0252f7c586 Improved kdoc for OsCondition annotation 2023-06-13 12:37:38 +00:00
Roman Golyshev 9f819b4c57 KTIJ-25823 [Analysis API][FIR] Filter reanalysed parts by type in FirBodyReanalyzingVisitorVoid
There are SOE exceptions caused by the fact that `getOrBuildFir` can
return a FIR declaration for the parent PSI. I wasn't able to reproduce
it locally, but this commit should prevent such problems by using
`getOrBuildFirSafe` with explicit type specification
2023-06-13 12:33:06 +00:00
Timofey Solonin 0c464450a9 Remove extraneous checks 2023-06-13 12:32:41 +00:00
Timofey Solonin 76eef2adb1 [MPP] Remove obsolete targets from MppCInteropDependencyTransformationIT.ComplexProject
^KT-58822
2023-06-13 12:32:41 +00:00
Alexander Shabalin da1fde2477 [K/N] Enable custom allocator by default ^KT-55364 2023-06-13 10:22:04 +00:00
Ivan Kochurkin 1e09e8663c [FIR] Add compatibleOnly parameter to getSingleCompatibleExpectForActualOrNull
Rename `getSingleCompatibleExpectForActualOrNull` to `getSingleExpectForActualOrNull`
2023-06-13 10:12:44 +00:00
vladislav.grechko d600d768a6 Do not assert existence of metadata for local delegated properties
Local delegated property may origin from a body of inlined function.
In that case, they contain no metatada - which is ok, as the original
local delegated properties contain it and will be serialized.

^KT-58780: Fixed
2023-06-13 10:04:28 +00:00
Kirill Rakhman 4b85776405 [FIR] Fix completion of FirDelegatedConstructorCall
Before this fix, changes that were made to the arguments list by calling
argumentList.transformArguments() were overriden by replaceArgumentList.
This fixes reverses the order in which these calls are made.
This also aligns the logic between the completion of qualified accesses
and delegated constructor calls.

#KT-59102 Fixed
2023-06-13 09:47:58 +00:00
Dmitrii Krasnov 267068546f migrated git connected cocoapods test to new test dsl (junit 5 and gradle test kit)
#KT-51553 In Progress
2023-06-13 06:34:33 +00:00
Mikhail Glukhikh 35b475f9f7 K2: Fix processing inference lower bound NullableType <: T & Any
This commit is a follow-up to 0d070f8ba9.
Here we remove accidentally returning "Not a sub-type" for a constraint
like TypeVariable <: DNN type

#KT-59241 Fixed
2023-06-12 22:36:02 +00:00
Mikhail Glukhikh ab1d634ad3 K2: add test for KT-59241 2023-06-12 22:36:02 +00:00
Brian Norman a71437335b [FIR] Unwrap definitely not-null types in type parameter cycle checks
#KT-58944 Fixed
2023-06-12 20:05:23 +00:00
Dmitrii Gridin 2bbf57c15e JavaElementCollectionFromPsiArrayUtil: cleanup code 2023-06-12 16:41:26 +00:00
Dmitrii Gridin 6992a707dc [LL FIR, Java] fix resolve contract violation from java symbol provider from supertypes
To create a smart psi type pointer, IJ Platform uses resolve
We cannot use resolve from JavaSymbolProvider,
as it may lead to resolve contract violation

^KT-59240 Fixed
2023-06-12 16:41:26 +00:00
Anton Lakotka 67d933185a [Gradle] Apply Language Settings in the correct Lifecycle Stages
After introduction of KGP Lifecycle stages the application of
Language Settings to Targets and Compilation (from source set level)
wasn't synchronized. Which led to data flow race. Delaying this
application to correct stages solves the data flow race.

^KT-59063
2023-06-12 13:19:52 +00:00
Anton Lakotka b097292ddf [Gradle] Update setupGeneralKotlinExtensionParameters to work correctly
with KGP lifecycles. It is unknown whether given source set is in main
compilation or not until certain lifecycle stage (AfterFinaliseRefinesEdges)

Therefore, configuring kotlin extension parameters that should
be delayed.

^KT-59063
2023-06-12 13:19:52 +00:00
Pavel Mikhailovskii 46844100d5 Fix visibility of $annotations methods 2023-06-12 12:59:53 +00:00
Bogdan Mukvich b4004763cc [Gradle] Fix pom for kotlin-annotation-processing-gradle
^KTIJ-25586
2023-06-12 11:45:26 +00:00
Denis.Zharkov 41933facbb K2: Fix ISE from inference on delegate vars with implicit types
See the test data.
ISE happened because at some point after incomplete `getValue` resolution
of `a` property, we updated in the `transformAccessors` the property type
to the `Variable(Y)` type and then used it as a 3rd argument for
`setValue` call which is incorrect because the variable belongs
to a different constraint system (from `getValue`).

Mostly, the fix is just a repeating K1 behavior, namely postponing
`setValue` resolution until delegate inference is completed.

^KT-59066 Fixed
2023-06-12 11:30:35 +00:00
Vyacheslav Gerasimov b8c4a4c80a Build: Add missing v8 artifacts to the verification-metadata.xml 2023-06-12 12:48:04 +02:00
Vladimir Dolzhenko f9d67feb05 Fix the owner list
Merge-request: KT-MR-10559
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2023-06-12 07:26:17 +00:00
Dmitrii Gridin ea9244bf48 [FIR] ReturnTypeCalculatorWithJump: support WrappedIntegerOperator explicitly
^KTIJ-25761
2023-06-10 17:57:52 +00:00
Dmitrii Gridin d7c197b31e [LL FIR] support lazy resolve for WrappedIntegerOperator
^KTIJ-25761 Fixed
2023-06-10 17:57:52 +00:00
Dmitrii Gridin 563f913a95 [LL FIR] introduce tests to check lazy resolve stdlib as sources
^KTIJ-25761
2023-06-10 17:57:52 +00:00
Anna Kozlova e81099ca96 [light classes] create enum references as PsiReferenceExpressions
to better mimic java psi,
see e.g. `PsiJvmConversionHelper#getAnnotationAttributeValue(PsiAnnotationMemberValue)`
2023-06-10 08:30:26 +00:00
Dmitriy Novozhilov 29afd0dc97 [FIR] Properly match expect fun interfaces with java interfaces 2023-06-10 07:33:30 +00:00
Dmitriy Novozhilov 1418a2bcb8 [Test] Temporary update testdata till KT-58829 will be fixed 2023-06-10 07:33:30 +00:00
Dmitriy Novozhilov af041f5bef [Test] Update test according to KT-58899 2023-06-10 07:33:30 +00:00
Dmitriy Novozhilov c64310a833 [Test] Update tests according to KT-58544
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
2023-06-10 07:33:29 +00:00
Dmitriy Novozhilov 8b9079d026 [Expect/Actual] Add ability to skip matching of constructors of expect enums
In terms of MPP there are no such thing as `expect constructor` for enums,
  but they are physically exist in FIR and IR, so we need a switch which
  skips matching for them

FE 1.0 implementation did not touch to avoid any hidden changes
2023-06-10 07:33:29 +00:00