Commit Graph

109969 Commits

Author SHA1 Message Date
Alexander Shabalin bbcc5c9aed [K/N][tests] Migrate interopTest tests ^KT-61259 2024-03-14 11:47:00 +00:00
Kirill Rakhman c227e60150 [FIR] Fix resolution of LHS of augmented assignment operator call
Resolve it like a receiver of a call.
This makes the resolution result consistent with the equivalent
function call.

The K1 difference is covered by KT-66453.

#KT-66504 Fixed
2024-03-14 11:32:38 +00:00
Kirill Rakhman 609906a0b1 [FIR] Extract function for receiver resolution 2024-03-14 11:32:38 +00:00
Kirill Rakhman ff981a49ad [FIR] Make return types more precise 2024-03-14 11:32:38 +00:00
Kirill Rakhman 9f750d3036 [Tests] Reproduce current behavior of operator/infix resolution
#KT-66504
#KT-66453
#KT-58260
2024-03-14 11:32:38 +00:00
Dmitriy Novozhilov f288163cbc [Test] Use rethrow for checked exception in java-written tests
In 9b5a9ccb `throws Exception` was removed from java test sources and
  all checked exceptions were wrapped with `RuntimeException`

But it was forgotten that there is a `rethrow` utility, which doesn't
  wrap exception but makes the javac happy at the same time
2024-03-14 11:04:02 +00:00
Dmitriy Novozhilov 09c27d78b8 [Test] Revert not-needed change in KotlinTestUtils
The corresponding test was incorrectly muted in c818ce92
2024-03-14 11:04:02 +00:00
Nikita Bobko a8275c99a3 [FIR, IR] Check for strict subtypes during actualization
^KT-65775 Fixed
Review: https://jetbrains.team/p/kt/reviews/14906/timeline
2024-03-14 10:53:43 +00:00
Yan Zhulanow 0fec50135f [kotlin] Provide CFG facade for the extract function refactoring
This is the first implementation of a control flow graph facade for the
extract function IDE refactoring. The exact contents of
'KtDataFlowExitPointSnapshot' will be refined later.

^KT-65762 Fixed
2024-03-14 10:53:11 +00:00
Wojciech Litewka b032e647f7 [IR] Move assert in IrSetValueImpl to factory function
#KT-65773 In Progress
2024-03-14 10:41:52 +00:00
Wojciech Litewka 62f546ca0c [IR] Hide constructors of implementation classes behind factory functions
This is a step towards generating those classes. The code generator
won't care about default values in parameters,
and secondly, it will reorder some constructor parameters.
To keep source compatibility, new factory functions are created,
with the same signature as the constructor.
They will resist the change in order of constructor parameters.
Eliminating direct calls to constructors should also make further
refactorings a bit easier.

This change omits classes deriving from IrMemberAccessExpression,
as they are a bit more complicated
and will require separate effort.

#KT-65773 In Progress
2024-03-14 10:41:51 +00:00
Ivan Kochurkin b24d5390a8 [FIR] Use proper directOverriddenFunctions fun in FirNativeThrowsChecker
Fix false positive `INCOMPATIBLE_THROWS_OVERRIDE`

^KT-65105 Fixed

Merge-request: KT-MR-14937
Merged-by: Ivan Kochurkin <Ivan.Kochurkin@jetbrains.com>
2024-03-14 10:37:08 +00:00
Dmitriy Dolovov 4941094521 API 4 ABI: Dump WASM target names
We need to dump WASM target names exactly as we do it for Native target
names.

^KT-66367
2024-03-14 10:33:00 +00:00
Dmitriy Dolovov d43db973d4 API 4 ABI: Rename manifest property: wasm_target -> wasm_targets
^KT-66367
2024-03-14 10:33:00 +00:00
Dmitriy Dolovov 25de42b7eb API 4 ABI: Move const val KLIB_PROPERTY_WASM_TARGET to :kotlin-util-klib
^KT-66367
2024-03-14 10:33:00 +00:00
Aleksei.Glushko 651f068e06 [K/N] Fix a race on mark queue destruction in CMS GC
Merge-request: KT-MR-14076
2024-03-14 10:23:06 +00:00
Aleksei.Glushko fb7176d5fa [K/N] Checked ManuallyScoped
Merge-request: KT-MR-14076
2024-03-14 10:23:06 +00:00
Aleksei.Glushko 5396a6f8da [K/N] Avoid unitialized "fake" values
Do not use `char[sizeof(T)]` as an internal utility replacement for `T` (e.g. in intrusive_list::head_).
    It's UB to access members of such values before a propper constructor of T is called.

    Merge-request: KT-MR-14076
2024-03-14 10:23:06 +00:00
Yan Zhulanow 1f39bc9a18 [Analysis API] Add tests for foreign values 2024-03-14 10:20:29 +00:00
Yan Zhulanow 2dd16e1179 [Analysis API] Fix 'getContainingDeclaration()' for foreign values
Foreign values (such as '_DebugLabel' properties contributed by the
debugger) don't have a parent (or a valid source element in general).

^KTIJ-27382 Fixed
2024-03-14 10:20:29 +00:00
Yan Zhulanow 88a85b8936 [Analysis API] Add reference tests for containing declaration provider 2024-03-14 10:20:29 +00:00
Yan Zhulanow e171e21165 [Analysis API] Minor, remove duplicating check 2024-03-14 10:20:29 +00:00
Aleksandra.Arsenteva 83d0e1f447 [Test] KT-66152 Add tests for generic static function 2024-03-14 10:16:46 +00:00
cristiangarcia 8200cf404c Fix GitDownloadTask fails on windows
Required for KTI-1553
2024-03-14 09:19:37 +00:00
cristiangarcia 8dc460ae4a Fix CompileToExecutable CC issues
Required for KTI-1553
2024-03-14 09:19:37 +00:00
cristiangarcia 987f67e312 Fix CompileToExecutable CC issues
Required for KTI-1553
2024-03-14 09:19:37 +00:00
cristiangarcia 7693d9b9c4 KonanTest is not CC compatible
Required for KTI-1553
2024-03-14 09:19:37 +00:00
cristiangarcia 1e85233aab KonanDriverTest is not CC compatible
Required for KTI-1553
2024-03-14 09:19:37 +00:00
cristiangarcia bbbe5027f4 Postpone KonanCliCompilerRunner creation to workaround issues when consuming native dist
Required for KTI-1553
2024-03-14 09:19:37 +00:00
cristiangarcia bfbdf79207 ClangFrontend: notCompatibleWithConfigurationCache because GoogleTests are downloaded later
Required for KTI-1553
2024-03-14 09:19:37 +00:00
cristiangarcia 8f1f6ca9c9 Make :kotlin-native:runtime:hostRuntimeTests CC compatible
Required for KTI-1553
2024-03-14 09:19:37 +00:00
cristiangarcia 09dc9c6743 Enable configuration-cache
Fixes KTI-1553
2024-03-14 09:19:37 +00:00
Kirill Rakhman 786c37286c [FIR] Fix crash caused by cast of raw type to simple type
#KT-66552 Fixed
2024-03-14 08:42:20 +00:00
Dmitriy Dolovov cec36355b2 [JS] Don't turn on PL in tests with IGNORE_ERRORS directive
^KT-64817
2024-03-14 07:53:48 +00:00
Mads Ager b0bc017a16 [Parcelize] Add test for parcelize in multiplatform setting.
This tests that classes in common code can have code generated
for them in android compilations.
2024-03-14 06:52:19 +00:00
Mads Ager fa0d456850 [Parcelize] Allow parcelize to work on common code in multiplatform.
Since parcelize is Android specific, it should only be enabled for
Android compilation. In order to allow parcelize to generate code
for declarations in common code, we make checkers platform checkers
and we allow the registration of an additional annotations to
trigger parcelize processing.

That way, code such as:

```
package my.package

annotation class Parcelize

expect interface MyParcelable

@Parcelize
data class User(name: String): MyParcelable
```

Will work with an Android platform actual of the form:

```
actual typealias MyParcelable = android.os.Parcelable
```

And telling the plugin to trigger parcelize processing with the
additional annotation `my.package.Parcelize`.

Fixes https://issuetracker.google.com/315775835.
2024-03-14 06:52:19 +00:00
Mads Ager 5f971d6d9d [Test] Don't fail on metadata errors in fir based codegen tests 2024-03-14 06:52:18 +00:00
Dmitriy Novozhilov 7ba47f70c0 [Test] Unmute some passing K2 KGP integration tests 2024-03-14 06:31:39 +00:00
Yan Zhulanow 0147d725fb [Analysis API] Provide type mapping for callable references
Strictly speaking, callable references are not calls. However, type
arguments are still inferred for references, and 'KtCall' is the only
place in Analysis API that exposes call-substituted types.

^KT-66485 Fixed
2024-03-14 06:10:31 +00:00
Andrey Yastrebov 6028595ce4 KT-66486 Do not use synthetic project for spm 2024-03-13 22:59:38 +00:00
Sonya Valchuk b6d73fc6ac jvm-abi-gen: use asm flag to skip debug info 2024-03-13 21:31:19 +00:00
Sonya Valchuk 9518416bdb jvm-abi-gen: remove parts of the SMAP used only in stripped methods 2024-03-13 21:31:19 +00:00
Sonya Valchuk 0005ba47f8 JVM: extract some helpers for SMAP inlining 2024-03-13 21:31:19 +00:00
Mikhail Glukhikh 95fa065361 Temporary: don't check log in Maven test (KT-66551) 2024-03-13 20:38:45 +00:00
Mikhail Glukhikh f2ec6d7495 Temporary: comment the last check in JavaUsageTest (KT-66551) 2024-03-13 20:38:45 +00:00
Mikhail Glukhikh 0757247233 Temporary: mute pre-release warnings in Gradle tests (KT-66551) 2024-03-13 20:38:44 +00:00
Mikhail Glukhikh 92cf3e3343 Temporary: make "Pre-release classes were found in dependencies" warning
See KT-66551
2024-03-13 20:38:44 +00:00
Mikhail Glukhikh 893e5cac94 Temporary: mute PRE_RELEASE_CLASS in some tests (KT-66551) 2024-03-13 20:38:44 +00:00
Mikhail Glukhikh a0cb713d19 Temporary: make PRE_RELEASE_CLASS a warning in both K1/K2 (KT-66551) 2024-03-13 20:38:44 +00:00
Mikhail Glukhikh 93a796b635 Temporarily unmute passing test around IS_PRE_RELEASE (related to KT-62063)
This test (probably) should be muted again after bootstrapping
2024-03-13 20:38:44 +00:00