Commit Graph

109901 Commits

Author SHA1 Message Date
Roman Golyshev de75297875 KT-66498 [AA] Add more tests for the isSubClassOf/isDirectSubClassOf
Also, reproduce the difference between the K1 and K2 implementation
of `isSubClassOf` for the same class
2024-03-13 16:31:41 +00:00
Mikhail Glukhikh f656a9fdc6 Migrate some KT-65789 & KT-58920 tests on using take<ExpectedType>(arg) 2024-03-13 14:57:34 +00:00
Mikhail Glukhikh 0f53ee64d6 K2: make qualifier & classifier the same tower level
#KT-65789 Fixed
#KT-38031 Fixed
2024-03-13 14:57:34 +00:00
Mikhail Glukhikh d6e67e43f9 K1/K2: add a test for KT-62866 2024-03-13 14:57:34 +00:00
Mikhail Glukhikh 3b9e08d6b8 K1/K2: reproduce KT-65789 2024-03-13 14:57:33 +00:00
Aleksei.Glushko f2501ad424 [K/N] Use already dereferenced weakReferee (KT-66371)
And prevent weak barriers from execution during STW

Merge-request: KT-MR-14797
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com>
2024-03-13 14:43:59 +00:00
Roman Efremov 284d5437e5 [FIR] Don't transform call arguments during TYPES phase
Instead, it should happen during BODY_RESOLVE phase.

This fixes KT-66150. The problem was, that `super<B>.f()` expression
in delegated constructor call was transformed during TYPES phase,
and type transformer has no special logic for allowing bare types in
super qualifiers, like the one in expressions transformer (see
`org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirExpressionsResolveTransformer.transformSuperReceiver`).
As a result, `B` without type argument leads to
WrongNumberOfTypeArgumentsError.
It looks incorrect that expressions in constructor call resolved
during TYPES phase, so skipping transformation of
argument list seems like the best solution here.

^KT-66150 Fixed
2024-03-13 14:31:14 +00:00
Roman Efremov c4f89ab32e [Test] Add test reproducing incorrect error in K2 about super qualifier
...with type arguments.
Also, add lazy resolve test to check the subsequent changes are correct.

^KT-66150
2024-03-13 14:31:14 +00:00
Artem Kobzar a38d317824 [K/JS] Use globalThis isntead of this for UMD modules ^KT-45604 Fixed 2024-03-13 13:36:55 +00:00
Kirill Rakhman 43a08068fc [Tests] Add regression tests for KT-32754
#KT-32754 Fixed
2024-03-13 12:39:54 +00:00
Alexander Shabalin adf5331ff0 [K/N] Remove more ext properties 2024-03-13 12:35:15 +00:00
Alexander Shabalin 23710ac133 [K/N] Keep isolatedClassLoaders in a build service 2024-03-13 12:35:15 +00:00
Alexander Shabalin 3532056e0d [K/N] Remove global execClang extension 2024-03-13 12:35:15 +00:00
Alexander Shabalin aead2c2bff [K/N] Remove unused targetsWithoutZlib 2024-03-13 12:35:15 +00:00
Alexander Shabalin 5a9eea8c45 [K/N] Remove unused gradle ext properties 2024-03-13 12:35:15 +00:00
Alexander Shabalin bb8c8431e8 [K/N][tests] Move gradle stuff for old infra to old infra 2024-03-13 12:35:15 +00:00
Dmitriy Novozhilov c818ce9220 [Test] Add test for KT-66338 2024-03-13 09:17:17 +00:00
Alexander Udalov 55f9f74d5c Tests: do not report backend diagnostics if there's frontend error
In most affected tests, the backend diagnostic such as "conflicting JVM
signature" or "accidental override" is directly caused by some already
existing error reported by frontend, so it doesn't make sense to check
backend diagnostics there.

Tests where that was not the case were moved/copied to
`testsWithJvmBackend`.
2024-03-13 08:38:15 +00:00
Alexander Udalov dca6c21d7f Tests: remove duplicateJvmSignature diagnostic tests
All of these tests were actually copied to `testsWithJvmBackend` in
866f188120, but it's unclear why they were copied instead of moved. The
test runner for `testsWithJvmBackend` correctly runs the compiler
pipeline and obtains errors reported by the backend, as opposed to the
common diagnostic tests which have a very custom code, using parts of
the old JVM backend, to obtain these diagnostics.
2024-03-13 08:38:15 +00:00
Alexander Udalov 6ed06f4dac Tests: minor, move diagnostic test missingNames.kt
Looks like it was placed in the `duplicateJvmSignature` directory by
mistake.
2024-03-13 08:38:14 +00:00
Alexander Udalov 5be1ff1d5f Tests: minor, remove obsolete diagnostic tests
- `require.kt` was added to check JVM accidental override diagnostic
  when using the "traits with required classes" feature, which was
  removed a long time ago.
- `withErrorTypes.kt` was testing conflicting JVM declarations error (a
  backend diagnostic) in presence of error types -- not very useful
  scenario because the backend is not run when there's a frontend error.
2024-03-13 08:38:14 +00:00
eugene.levenetc f7f779df53 [ObjCExport] Add inner classes translation
KT-66339
2024-03-13 08:10:21 +00:00
Vladimir Sukharev 5fee662223 [Tests] Add test for KT-57391
^KT-57391
2024-03-12 18:10:10 +00:00
Artem Kobzar 46dc478c03 [K/Wasm] Reduce debug information for the internal Kotlin functions 2024-03-12 17:37:03 +00:00
Nikolay Lunyak d3dfbec01a [FIR] Report warnings for inconsistent visibilities of accessors
K1 didn't report diagnostics for accessors
of intersection overrides, so this change
prevents a BC.

^KT-66046 Fixed
2024-03-12 16:35:05 +00:00
Nikolay Lunyak 7ecbaf7d1e [FIR] Calculate property setters visibilities for intersections properly
Basically, just calculate them the same
way it's done for other members.

`chooseIntersectionVisibilityForSymbolsOrNull`
is named like this to prevent a JVM clash.

^KT-66046 Fixed
2024-03-12 16:35:05 +00:00
Nikolay Lunyak b7926b68ab [FIR] Fix sources of intersection override properties's accessors
^KT-66046
2024-03-12 16:35:05 +00:00
Nikolay Lunyak daa6e03e3b [FIR] Reproduce KT-66046
^KT-66046
2024-03-12 16:35:05 +00:00
Dmitry Savvinov 08dc7aeee3 [native] Minor: remove PlatformManager.Serialized.serialVersionUUID
Leave a comment why it doesn't matter
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 55e36dcf66 [build, native] Minor: delete obsolete commented out code 2024-03-12 16:22:27 +00:00
Dmitry Savvinov b19ad2505c [native] Remove code support for experimental KonanTargets
ZEPHYR was the first and the last experimental KonanTarget.
As ZEPHYR is now entirely removed from the codebase, the respective code
can be dropped

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 47546ece27 [tests] Adjust MppDiagnosticsIt after removing deprecated K/N targets (8/8)
Tests were using deprecated targets to produce ERROR-diagnostics.
Replace it with a different diagnostic
(CommonMainOrTestWithDependsOnEdges)

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 9e8be97fbb [tests] Adjust ModuleChangesCatchingTest after removing K/N targets (7/8)
MPP_PLATFORMS has changed due to removal of deprecated K/N targets,
so the version and hashes had to be updated

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 53cbeb8edc [build, native] Adjust buildscripts after dropping K/N targets (6/8)
- Restore PlatformManager constructor (used in buildscripts)
- Replace references to deprecated K/N target with 'else'

Why: buildscripts use these references and compile against older K/N
version (from bootstrap). So they can't be adjusted to newer API,
compilation will fail right away. However, they can't be kept without
changes, because bootstrap tests will fail.

^KT-64517
^KT-66500
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 8f3c0e71fa [native] Drop deprecated Kotlin/Native targets (5/8)
Adjust KGP: drop usages of deprecated KonanTargets, leave
@Deprecated-stubs in public APIs for readable errors

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 4957d99fd6 [native] Drop deprecated Kotlin/Native targets (4/8)
We still want to report a readable error on using removed targets rather
than just an "Unknown target"-exception. As previous commits has removed
actual KonanTarget-entries, the check has to be adjusted to work on
plain strings.

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 29e90d70c6 [native] Drop deprecated Kotlin/Native targets (3/8)
This commit inlines some helper-APIs that became redundant after
dropping deprecated targets.

Full list:
- 'threadsAreAllowed' is always 'true' now
- 'indirectBranchesAreAllowed' is always 'true' now
- 'supportsThreads' is always 'true' now
- 'isMips' is always 'false' now
- 'tlsMode' is always 'LLVMGeneralDynamicTLSModel' now
- 'getBoxRange' is always equal to 'cache.defaultRange' now
-  `targetHasAddressDependency` is always true now, so memory order
   is always LLVMAtomicOrderingMonotonic now

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 85bcc8443d [native] Drop deprecated Kotlin/Native targets (2/8)
Remove plain references to removed KonanTarget or Family entries. All
the changes in this commit are simple removal of some when-branches
on now dropped entries

^KT-64517
2024-03-12 16:22:26 +00:00
Dmitry Savvinov 0f05ffe111 [native] Drop deprecated Kotlin/Native targets (1/8)
Remove sealed subclasses in KonanTarget and associated entries in
Family. This commit doesn't adjust use-sites in the codebase,
see the following commits for that

Implementation notes:
- we use @Deprecated object-stubs in place of previously used sealed
subclasses/enum entries to report readable error instead of plain
UNRESOLVED_REFERENCE on usages of deprecated FQNs.

- these object-stubs *are not* part of the respective sealed
hierarchy/enum class. This is to make it possible to remove
references to them from use-site entirely without breaking exhaustive
'when's

^KT-64517 Fixed
2024-03-12 16:22:26 +00:00
Mikhail Glukhikh 0b34d66b87 Revert "FIR: Report CAPTURED_VAL_INITIALIZATION if initialization is done"
This reverts commit 1c4023fda5.

#KT-64854 Submitted
#KT-59906 Submitted
2024-03-12 15:58:34 +00:00
Ilya Chernikov 0fe793943d K2, REPL: Display a warning that LV 1.9 is used for REPL in K2
#KT-64384 fixed
2024-03-12 15:57:00 +00:00
Alexander Shabalin 8c6966765b [K/N][tests] Move driver tests into their own project ^KT-61259 2024-03-12 15:42:06 +00:00
Alexander Shabalin 316614bc9e Revert "Revert "[K/N][Tests] Ignore KonanDriverTest tests on MinGW/opt.debug/cache.no""
This reverts commit 876be8f17a.
2024-03-12 15:42:06 +00:00
Alexander Shabalin 9832edddab Revert "Revert "[K/N][Tests] Migrate test override_konan_properties0 and add testDriverVersion""
This reverts commit 8518c3f54f.
2024-03-12 15:42:06 +00:00
Alexander Shabalin 60c74ab91a Revert "Revert "[K/N][Tests] Migrate test override_konan_properties0""
This reverts commit 4765cfda53.
2024-03-12 15:42:06 +00:00
Alexander Shabalin 3c097ee5e0 Revert "Revert "[K/N][Tests] Migrate driver test llvm_variant_dev""
This reverts commit dc4f12f29c.
2024-03-12 15:42:06 +00:00
Alexander Shabalin e95af641bc Revert "[K/N][tests] Restore ir_providers/hello.kt ^KTI-1597"
This reverts commit c600b74459.
2024-03-12 15:42:06 +00:00
Mikhail Glukhikh d897bfbcad Fix tests after a semantically conflicting merge of KT-50008 and KT-65596 2024-03-12 14:54:10 +00:00
Timofey Solonin e56a4c6edb Validate AGP 7.1.3 doesn't publish resources or assets
^KT-65540
2024-03-12 14:51:05 +00:00
Timofey Solonin 818368efa0 Assert Android compilations run
^KT-65540
2024-03-12 14:51:05 +00:00