Commit Graph

109947 Commits

Author SHA1 Message Date
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
Mikhail Glukhikh f37347ddb7 Temporarily mute failing test around IS_PRE_RELEASE (related to KT-62063)
This test should be fixed by bootstrapping or in KT-66551
2024-03-13 20:38:44 +00:00
Mikhail Glukhikh dc879a3875 K2: drop poisoning flag due to upcoming 2.0.0-RC
#KT-62063 Fixed
2024-03-13 20:38:44 +00:00
Kirill Rakhman b74dcb77e3 [FIR] Add opt-in to replaceIsTrailingLambda
#KT-66553
2024-03-13 17:05:48 +00:00
Kirill Rakhman 1876c8a9ee [AA] Fix getKtExpressionType for augmented array assignment
This previously worked on accident because the get call in an
augmented array assignment wouldn't have a resolved argument list, and
so `argumentsToSubstitutedValueParameters` would return null.
Now, we additionally verify that we're in a `set` call.

#KT-66124
2024-03-13 17:05:48 +00:00
Kirill Rakhman 0cac6b66d5 [FIR] Remove vararg workaround in FirArgumentsToParametersMapper
Since we save the unresolved argument list, we don't need the workaround
anymore.

#KT-66124
2024-03-13 17:05:48 +00:00
Kirill Rakhman fbb21f2406 [FIR2IR] Remove argument unwrapping for SAM conversion
FirNamedArgumentExpressions don't exist anymore during FIR2IR phase
and so we don't need to unwrap arguments here anymore.

#KT-66124
2024-03-13 17:05:48 +00:00
Kirill Rakhman 015f257031 [FIR2IR] Remove special handling of named arguments for vararg
FirNamedArgumentExpressions don't exist anymore during FIR2IR phase
and so handling FirSpreadArgumentExpression in Fir2IrVisitor is
sufficient.

#KT-66124
2024-03-13 17:05:48 +00:00
Kirill Rakhman d16cc668cd [FIR] Add KDocs for wrapped argument expressions
#KT-66124
2024-03-13 17:05:48 +00:00
Kirill Rakhman 454ef4ae46 [FIR] Build resolved argument list for augmented array assignment get call
This lets us get rid of some fallback code in FIR2IR that handles
unresolved argument lists.
After this, we should have an invariant that all non-empty argument
lists are resolved when FIR2IR runs.

#KT-66124
2024-03-13 17:05:48 +00:00
Kirill Rakhman 8443daf78d [FIR] Remove FirNamedArgumentExpressions during completion
They are mostly necessary for argument mapping during resolution.
To support a couple checkers, we transform named args for varargs
into "fake" spread expressions.

Other than that, named arguments aren't needed for anything and often
lead to bugs where we forget to unwrap them for something, so it's
better to get rid of them.

#KT-66124
2024-03-13 17:05:48 +00:00
Kirill Rakhman 03fc0fd381 [FIR] Remove FirLambdaArgumentExpression
It's not really necessary if the information about if the lambda was a
trailing lambda can be directly saved in FirAnonymousFunctionExpression.

Removing the FIR node uncovered a couple of bugs
(UNINITIALIZED_ENUM_ENTRY, ERROR_IN_CONTRACT_DESCRIPTION) that were
caused by assuming that a lambda is always a trailing lambda.

#KT-66124
2024-03-13 17:05:48 +00:00
Kirill Rakhman 1a5fa8d3f6 [Tests] Add test for suspend SAM conversion with trailing lambda
#KT-65878
#KT-66124
2024-03-13 17:05:48 +00:00
Kirill Rakhman 5a00984607 [FIR] Fix misleading return type 2024-03-13 17:05:48 +00:00
Kirill Rakhman b4d036ce58 [FIR] Remove unused code 2024-03-13 17:05:48 +00:00
Ivan Kylchik 61fabc02ba [K2] Resolve bodies of const properties during IMPLICIT_TYPES_BODY_RESOLVE
This is required to implement constant evaluator on the FIR level.

#KT-64151
2024-03-13 16:53:59 +00:00
Ivan Kylchik 0ebf2862a9 [K2] Add new tests on lazy resolve to check new resolve rules
In the consequent commits, there are some changes in FIR resolve.
These tests will show the difference.

#KT-64151
2024-03-13 16:53:59 +00:00
Roman Golyshev 1884a655c5 KT-66498 [AA] Provide KDoc for isSubClassOf and isDirectSubClassOf 2024-03-13 16:31:41 +00:00
Roman Golyshev c6e442c18b KT-66498 [AA] Do not consider a class to be a subclass of itself in K1 impl for isSubClassOf
^KT-66498 Fixed
2024-03-13 16:31:41 +00:00
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