Commit Graph

1202 Commits

Author SHA1 Message Date
Igor Chevdar fe1d7c2f52 [K/N][tests] Fixed some of lldb tests 2023-05-11 16:56:40 +00:00
Ivan Kylchik d26e3871ba [K2] Support interpretation of values in type annotations
#KT-57812
2023-05-11 08:22:13 +00:00
Igor Chevdar 9fcb4ece64 [K/N][tests] Added a bunch of tests on incremental compilation 2023-05-10 08:37:32 +00:00
Igor Chevdar 74864ba1d0 [K/N][codegen] Trampoline to call virtual functions to reduce dependencies coupling 2023-05-10 08:37:32 +00:00
Dmitriy Novozhilov af60681705 [FIR] Save declarations in metadata in source order
^KT-54792 Fixed
^KT-54801
^KT-54800
2023-05-09 07:36:32 +00:00
Yahor Berdnikau 0790fef161 Fix explicit api mode in commonizer
^KT-57653
2023-05-08 19:43:43 +00:00
Mikhail Zarechenskiy 6d7dc45ce6 K1: Add test for compatibility check of Enum.entries
Basically, the test checks that adding Enum.entries feature doesn't
break the existing code where it clashes with the user-defined "entries"
declaration; it's better to have a black-box test to be sure
that the compiler doesn't invoke something different at runtime

 The test covers KT-53153 and KT-56587

Merge-request: KT-MR-9798
Merged-by: Michail Zarečenskij <Mikhail.Zarechenskiy@jetbrains.com>
2023-05-08 15:35:25 +00:00
Alexander Shabalin 142e2b4b2a [K/N] Add RosettaExecutor
Merge-request: KT-MR-9986
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2023-05-06 13:44:25 +00:00
Dmitriy Dolovov 5beec6b543 [Native][tests] Avoid failing with IO exceptions when the process under test is intentionally killed 2023-05-04 23:17:58 +00:00
Xin Wang 7b4e6bae0e JVM: ensure the $ENTRIES field is initialized before use
#KT-57784 Fixed
2023-05-04 23:11:39 +02:00
Vladimir Sukharev 79599ab69e [K2/N] Add ObjCExport test for kdoc strings
^KT-56090

Merge-request: KT-MR-9926
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-04 19:17:00 +00:00
Dmitriy Dolovov 57ba28ae3d [K/N][tests] Drop obsolete test tags
The obsolete tags that are no more used and are dropped by this commit:
* 'stdlibK2'
* 'kotlin-testK2'
* 'codegenK2'
* 'k2libContents'
* 'firInfrastructure'
2023-05-04 10:35:08 +00:00
Pavel Punegov 68ffa46187 [K/N][test] Increase default test timeout to 30 seconds
Sometimes on slower hosts longer running test may time out.

Merge-request: KT-MR-9935
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-05-04 08:50:14 +00:00
Pavel Kunyavskiy af318fdfb0 [K/N] Fix default arguments in suspend functions
AddContinuationToFunctionsLowering was rewritten in way the order
of this lowering and defaults lowering doesn't matter.

^KT-58214
2023-05-03 12:14:53 +00:00
Dmitriy Dolovov 0de06757ca [K/N][tests] Rework tags for K/N tests
Use plain combinations of tags, examples:
* codegen/box w/o FIR: 'codegen & !frontend-fir'
* codegen/box with FIR: 'codegen & frontend-fir'

Avoid using tags with multiple aspects in their names, examples:
* 'codegenK1'
* 'firCodegen'

The obsolete tags to be removed but still used in TeamCity configurations:
* 'stdlibK2'
* 'kotlin-testK2'
* 'codegenK2'
* 'k2libContents'
* 'firInfrastructure'
2023-05-03 11:49:43 +00:00
Dmitriy Dolovov f2b6cbeee8 [K/N][tests] Merge tags: noPartialLinkage() + noPartialLinkageMayBeSkipped() 2023-05-03 11:49:43 +00:00
Dmitriy Dolovov cdf84a019d [K/N][tests] Rename tags: hostOnly() -> forceHostTarget() 2023-05-03 11:49:43 +00:00
Dmitriy Dolovov d998ccedc2 [K/N][tests] Rename tags: debugOnly() -> forceDebugMode() 2023-05-03 11:49:43 +00:00
Dmitriy Dolovov 38a777fa94 [PL][tests] Mute K/N codegen/box tests failing in K1/one-stage mode
For details, see #KT-57747.
2023-05-02 10:58:38 +00:00
Dmitriy Novozhilov e9c8be3b64 [FIR] Don't generated fake-overrides for private declarations of actualized super classes
^KT-58252 Fixed
2023-05-02 10:24:53 +00:00
Dmitriy Novozhilov f7733e819d [FIR] Approximate captured types during approximation of local types
^KT-57222 Fixed
2023-04-30 15:58:32 +00:00
Alexander Udalov cd9209a7ee JVM: enable -Xlambdas=class in some codegen tests
Most of these tests check the specific structure of lambdas when they
are generated as classes, and they start to fail once invokedynamic
lambdas are enabled by default.
2023-04-28 21:34:19 +00:00
Alexander Udalov 163afc94bc JVM: prepare asmLike tests for indy lambdas by default
Use -Xlambdas=class in tests which were checking specific things related
to how anonymous classes for lambdas work (such as receiver mangling,
function arity etc.)
2023-04-28 21:34:19 +00:00
Alexander Udalov fc0ce415d7 JVM: remove source code from not null assertion message text
This is implemented under a LanguageFeature which will be enabled later,
when behavior change described in KT-57570 is approved.

 #KT-57570
2023-04-28 10:26:15 +00:00
Gleb Lukianets 242ca73d83 rrn/rd/KT-55578 User-provided hints for linker errors
[K/N] KT-55578 Show customized user suggestions on linkage errors

Merge-request: KT-MR-9636
Merged-by: Gleb Lukianets <Gleb.Lukianets@jetbrains.com>
2023-04-27 14:14:43 +00:00
Ilya Chernikov a045a0a81c FIR: use default getter in serializer if fir contains none
since we generate the default getter in this case in
Fir2IrDeclarationStorage.createIrProperty, so the serialized metadata
should follow the same behavior.
#KT-57373 fixed
2023-04-27 09:14:20 +00:00
Pavel Punegov a8bf83a97e [K/N][test] Wild-card the debugger tests to for with caches
Don't match all non-matching parts instead of excluding
2023-04-26 13:20:21 +00:00
Pavel Punegov 1a9e553013 [K/N][test] Set acceptable values for test class level properties
Adds @AcceptablePropertyValues annotation that accepts comma-separated
property values that could be used. If the value set from the command
line or as an enforced one is not in the list the default value will be
used instead.
2023-04-26 13:20:21 +00:00
Pavel Punegov 3ae9d2e4e8 [K/N][test] Make debugger tests work with caches
With caches (everywhere) Konan_start gets different location
`entryPointOwner:1:1`
2023-04-26 13:20:20 +00:00
Sergey Bogolepov fce878d63a [K/N] KT-56464: implementation of HiddenFromObjC for classes in backend 2023-04-26 09:36:10 +00:00
Alexander Udalov 3120a35a88 JvmDefault: remove most tests on @JvmDefault
The tests are removed because JvmDefault is going to be deprecated with
error in KT-54746 and removed later in KT-57696.

Many of the removed tests already had existing counterparts with the new
modes `all` and `all-compatibility`. In this change, I've added such
tests where they were missing, and removed tests which were testing
behavior specific to the JvmDefault annotation, such as some
diagnostics.

 #KT-54746
2023-04-25 14:33:00 +00:00
Nataliya.Valtman 2a391f7330 Move kotlin-build-statistic project to :compiler 2023-04-25 11:29:09 +00:00
nataliya.valtman e34dd043da Add minimal statistic report for JPS build
Fix build stat for gradle 8

#KT-56438 Fixed
2023-04-25 11:29:09 +00:00
Nikolay Lunyak 931894ab3c [FIR] KT-57655: Add the missing condition
^KT-57655 Fixed
2023-04-25 10:57:08 +00:00
Nikolay Lunyak c4d5332251 [FIR] KT-57655: Ensure the current IR is incorrect
The
`FirPsiBlackBoxCodegenTestGenerated.testImplicitIntegerCoercionNamedArg`
test fails in K2 with "java.lang.Integer
cannot be cast to kotlin.UInt".
2023-04-25 10:57:07 +00:00
Dmitriy Novozhilov 903e969598 [FIR2IR] Correctly calculate offsets for implicit toLong() calls during constant evaluation
^KT-58132 Fixed
2023-04-25 09:36:17 +00:00
Dmitriy Dolovov e85406b561 [PL][tests] Learn PL test infra to work with JS files
^KT-57378
2023-04-25 08:00:14 +00:00
Dmitriy Dolovov b5ad5edc08 [PL][JS] Add test for handling external declarations
^KT-57378
2023-04-25 08:00:14 +00:00
Yahor Berdnikau eb4e96a113 Add kotlin-build-tools-enum-compat workaround
It acts as a workaround for the case when build tools or dependencies
are compiled with latest 'kotlin-stdlib' version, but at a runtime older
 'kotlin-stdlib' is provided, which does not know about new
 `EnumEntries`.

 ^KT-57317 Fixed
2023-04-21 14:57:17 +00:00
Roman Golyshev d4cffb8a5a [213] Switch to 213 platform
KTI-1114
2023-04-21 13:19:04 +00:00
Ivan Kochurkin b72dcf8b37 [K2, MPP] Fix actualization of nullability-based overloads
^KT-58043 Fixed
2023-04-20 17:22:45 +00:00
Kirill Rakhman e80b4c530d [FIR2IR] Properly handle intersection types in interface delegation
The changes to the irText test data result in the fact that we
now unconditionally unwrap substitution overrides of delegation targets
whereas before we built an unsubstituted scope of the type we delegate
to. If we delegate to a class A : B<C>, the unsubstituted scope of
A can still contain substitution overrides for inherited generic methods
from B<T> that we didn't unwrap before but do unwrap now.

#KT-57899 Fixed
2023-04-20 08:12:55 +00:00
Ivan Kylchik 621f5a0fb7 [IR] Reorganize test files in involvesIrInterpreter dir 2023-04-19 13:52:48 +00:00
Ivan Kylchik 8cc8e54a9f [IR] Extract toString interpretation test of float value into new file
We need to distinguish `toString` results for JVM and JS
2023-04-19 13:52:46 +00:00
Ilya Chernikov 8cc9f911d5 FIR: temp: make klib symbol provider know parent packages
Current qualified access resolving algo rely (likely incorrectly,
see #KT-58037) on a providers' "knowledge" about parent packages.
This commit adds this "knowledge" to k-lib based provider.
#KT-57353 fixed
2023-04-19 11:42:03 +00:00
Mikhail Glukhikh c826c7301c K2 JS/Native: reproduce KT-57986 2023-04-17 20:53:30 +00:00
Ivan Kochurkin beaeb405d2 [K2, MPP] Build expect-actual map for type parameters from functions
^KT-57181 Fixed
2023-04-17 19:55:35 +00:00
Ivan Kochurkin b7bb9c317f [K2, MPP] Introduce FunctionDefaultParametersActualizerVisitor and use it in FunctionDefaultParametersActualizer
^KT-57263 Fixed
2023-04-17 19:55:34 +00:00
Evgeniy.Zhelenskiy aceab2ac1f [IR] Fix KT-57973
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-57973
2023-04-17 12:33:10 +00:00
Evgeniy.Zhelenskiy 8c748bfea4 [IR] Add more tests for inline/value classes secondary constructors
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-55333
2023-04-17 12:10:14 +00:00