Commit Graph

104434 Commits

Author SHA1 Message Date
Denis.Zharkov 033ff38fef K2: Adjust diagnostic test data after delegate inference is rewritten
In all tests, some red-code diagnostics have changed insignificantly
to some other combination or red-code diagnostics

^KT-61060 Related
2023-09-08 07:11:48 +00:00
Denis.Zharkov a02cb16fb2 K2: Rewrite delegate inference
The main idea is getting rid of stub types and using just type variables
See more detailed description at docs/fir/delegated_property_inference.md

The problem with stub types is that they need really special treatment
in many places, and on the other hand, there are no clear contracts on
how they should work (that regularly leads to bugs like KT-59529)

^KT-61060 Fixed
^KT-61075 Fixed
^KT-61077 Fixed
^KT-59529 Fixed
^KT-61633 Related
^KT-61618 Related
^KT-61740 Related
^KT-59107 Related
^KT-61747 Related
^KT-61077 Related
^KT-61781 Related
2023-09-08 07:11:48 +00:00
Denis.Zharkov cd5105c133 K2: Reformat FirCallCompletionResultsWriterTransformer.kt 2023-09-08 07:11:48 +00:00
Denis.Zharkov 06b0fc7e4c K2: Minor. Add comment for Candidate::substitutor 2023-09-08 07:11:48 +00:00
Denis.Zharkov f4004fb06a Add kdoc for ConstraintSystemCompletionMode.PARTIAL 2023-09-08 07:11:48 +00:00
Ivan Kylchik 6048d52a97 [K2] Avoid field inlining during FIR2IR phase
Before const inlining for fields, we actually want to remember a given
field in `InlineConstTracker`. We are doing it already in const
evaluation. So we just need to ignore const inlining in
`CallAndReferenceGenerator` and delegate it to const evaluation.

#KT-60737
2023-09-07 19:12:18 +00:00
Alexander.Likhachev 9dd4241a70 [Build, IGS] Make the consent checker tests parameterized tests 2023-09-07 17:32:37 +00:00
Alexander.Likhachev c7b2240c8e [Build, IGS] Add support for checking global consent 2023-09-07 17:32:37 +00:00
Alexander Shabalin a8cec11772 [K/N] Protect filecheck tests for KT-53261 from DCE. 2023-09-07 15:35:57 +00:00
Nikolay Lunyak f434228244 [FIR] Fix false positive POSITIONED_VALUE_ARGUMENT_FOR_JAVA_ANNOTATION
The original Java checker has an early return in
case of `resultingDescriptor !is JavaClassConstructorDescriptor`.
It fires if the descriptor is
`TypeAliasConstructorDescriptor`, thus further
diagnostics are not reported.
2023-09-07 13:48:22 +00:00
Rustam Musin 1efa9abf57 Add missing space in GradleStyleMessagerRenderer.render()
In `GradleStyleMessagerRenderer.render` method, when there is `location` pointing to some file and coordinates `line:column = 0:0`, then a space between the location and the message was not printed.
#KT-61737 Fixed
2023-09-07 13:34:59 +00:00
Nikolay Krasko 96a798d400 Revert "Ignore compose experimental modules during artifacts check"
This reverts commit a1250e838b.

KTI-1360
2023-09-07 13:26:38 +00:00
strangepleasures 88453a05f1 KT-53551 KT-52213 KT-58476 Fix handling of suspend functional types with context receivers 2023-09-07 12:40:01 +00:00
Nataliya.Valtman c2ee9bb1a4 Dont add languageVersion for KotlinNativeLink tasks
#KT-61401: Fixed
2023-09-07 12:34:22 +00:00
Dmitriy Novozhilov 37aad51438 [Build] Regenerate verification-metadata.xml in bootstrap-update script
This is needed for two purposes:
- sometimes dependencies may differ because of changes in KGP, and it's
  better to find it right after version-update commit, not only at remote run
- there is a plan to drop `trusted` section from `verification-metadata.xml`
  and always set specific versions of used dependencies even for bootstrap
  dependencies, so running it in regular bootstrap update routine won't
  allow forgetting about it (see KTI-1374)
2023-09-07 11:53:30 +00:00
Dmitriy Novozhilov 32cd4b7bad [Build] Update verification-metadata.xml to workaround KT-61766 2023-09-07 11:53:29 +00:00
Dmitriy Novozhilov db23c11e0b [Build] Update verification-metadata.xml 2023-09-07 11:53:29 +00:00
Dmitriy Novozhilov e69c9e2fc6 Advance bootstrap to 1.9.30-dev-2548 2023-09-07 11:53:28 +00:00
Vyacheslav Gerasimov 7d96623c37 Build: Extract toolchain resolve into a separate task
#KTI-72
2023-09-07 10:50:02 +00:00
Alexander Shabalin 49814ecb8a [K/N] Remove std_support allocation code ^KT-59008 2023-09-07 09:32:00 +00:00
Anton Bannykh 002cd011d4 [JS] add CLI test for KT-60531 2023-09-07 08:21:34 +00:00
Johan Bay 1e66f25546 [K/N] Link small bitcode modules together first
Repeatedly linking many smaller bitcode modules into one large is very
slow. We are seeing a 10x improvement by instead linking all the small
modules together first and link the result into the larger main module.
This commit implements this optimization in the
LinkBitcodeDependenciesPhase phase.

^KT-61604 Fixed


Co-authored-by: Johan Bay <jobay@google.com>
2023-09-07 07:44:31 +00:00
Alexander.Likhachev 6eaccc997f [Build] Fix the typo junit jupyter -> jupiter 2023-09-06 22:47:34 +00:00
Alexander.Likhachev a6f3dbb5f4 [Build] Remove unused AggregateTest 2023-09-06 22:47:34 +00:00
Alexander.Likhachev 37c8d789e6 [Build] Remove unused Project.preloadedDeps extension method 2023-09-06 22:47:34 +00:00
Alexander.Likhachev 7f8d9df76d [Build] Use the latest JUnit engine for kotlin-test-junit5 tests
This change aligns with the intention in 634279621d, however the "latest" version wasn't synced with other "latest" versions within the repo
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 4eb8a80b0c [Build] Update JUnit 5 to 5.10.0
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 6f96be0b76 [Build] Get rid of the testApiJUnit5 method
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 53fde520d5 [Build] Add jUnit dependencies in testApiJUnit5 to the implementation configuration
Adding these dependencies to the `api` configuration pollutes classpath for each dependant modules even if it doesn't need them. Instead, the dependencies should be declared more granularly if they're required
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 0ecbb64c64 [Build] Remove testApiJUnit5 parameters
Instead of declaring additional dependencies inside the method, declare them directly
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 7a1dc1f89b [Build] Do not add ij dependencies in testApiJUnit5
This is not needed since the dependencies are already declared as API dependencies in the relevant projects.
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Alexander.Likhachev ef0fb557a5 [Build] Split junit-jupiter into api and engine
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Alexander.Likhachev 357d12fc8e [Build] Move JUnit dependencies into the version catalog
The `kotlin-test` dependencies are left untouched as changing them affects publications, thus these versions are independent from the used inside our build
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
strangepleasures 9d43945b19 [KAPT4] KT-61729 Resolve annotation arguments during generation of @Metadata annotations 2023-09-06 19:47:28 +00:00
Alexander Shabalin 798e832943 [K/N] Remove fast paths phase checks in parallel mark ^KT-61741 2023-09-06 16:41:14 +00:00
Ilya Kirillov 190f7c4d30 [frontend] refactoring, reuse org.jetbrains.kotlin.resolve.multiplatform.isCompatibleOrWeakCompatible
to avoid code duplication
2023-09-06 16:30:28 +00:00
Ilya Kirillov 030250d387 [FIR] fix resolution ambiguities between weakly compatible expect and actual
There is a corresponding example inside the stdlib,
see `kotlin.text.startsWith`.

JVM and common counterpart are weakly-compatible
as the actual declaration has default arguments,
which results in `ExpectActualCompatibility.Incompatible.ActualFunctionWithDefaultParameters`

This commit allows such cases.

^KT-61732 fixed
2023-09-06 16:30:28 +00:00
Ilya Kirillov 209d59440b [Analysis API FIR]: fix a freeze on rendering of invalid type arguments
^KT-61750 fixed
2023-09-06 16:05:49 +00:00
Kirill Rakhman b41e5abcfa [FIR] Fix bounds check for inner classes of generic outer classes
#KT-61068 Fixed
#KT-35566
2023-09-06 15:15:07 +00:00
Roman Efremov 5e49b472f8 [FE, IR] Allow @ImplicitlyActualizedByJvmDeclaration to be set only on expect
@ImplicitlyActualizedByJvmDeclaration is the only one
OptionalExpectation annotation which works correctly when set only on
`expect`. All other (like @JvmName, @JsName) - not, so warning for them
must be reported.

^KT-61725 Fixed
2023-09-06 14:27:07 +00:00
Roman Golyshev efad248d7d KT-61245 [LL API] Refactor ContextCollector
Extract visiting class header into a separate function

^KT-61245 Fixed
2023-09-06 14:24:35 +00:00
Roman Golyshev 7ddb4f8324 KT-61245 [LL API] Collect correct context for class headers
To avoid collecting context which includes the implicit class receiver,
context for class header positions is collected before entering
the `context.withRegularClass` call
2023-09-06 14:24:35 +00:00
Roman Golyshev b44632b92f KT-61245 [LL API] Collect correct context for fields
There is a fake field created for the supertypes delegation,
and it needs to be visited by the collector
2023-09-06 14:24:35 +00:00
Alexander Shabalin f47a09e55e [K/N] Move allocator-specific data into allocators. ^KT-60928 2023-09-06 14:18:08 +00:00
Mikhail Glukhikh 056e644b6d FirBuiltinSymbolProvider: add a header comment describing built-ins
Related to KT-61330
2023-09-06 13:14:16 +00:00
Mikhail Glukhikh c695d2759a K2: add test plugin visitor checking source elements presence
Related to KT-60555, KT-61330
2023-09-06 13:14:16 +00:00
Mikhail Glukhikh 4d9457862f K2: add sourceElement for binary Java classes
#KT-60555 Fixed
2023-09-06 13:14:16 +00:00
Kirill Rakhman 10e94f90ac [Tests] Trim contents before checking for FIR_IDENTICAL 2023-09-06 11:32:57 +00:00
Alexander Udalov 6b919e2593 K2: fix FirCompileKotlinAgainstCustomBinariesTest
Behavior of reporting UNRESOLVED_REFERENCE was changed in 10f7989af6.
2023-09-06 12:41:39 +02:00
Artem Kobzar bff433f4e9 [K/JS] Support eager initialization for per-file granularity 2023-09-06 09:27:28 +00:00