Commit Graph

627 Commits

Author SHA1 Message Date
Evgeniy.Zhelenskiy 2d920df507 [IR] Fix KT-59346, KT-55993
#KT-59346
#KT-55993
2023-06-19 12:36:08 +00:00
Dmitriy Novozhilov d972b78627 [FIR] Allow actualization of expect classes by classes with wider visibility
^KT-59355 Fixed
2023-06-19 11:09:32 +00:00
Abduqodiri Qurbonzoda d6867917c9 Enum entry hashCode() should return identity hash code #KT-59223 2023-06-16 22:18:20 +00:00
Vladimir Sukharev 05e22e56d3 [K/N] Mark rest of reflection related tests as jvm-only
^KT-59057

Merge-request: KT-MR-10570
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-06-16 11:50:03 +00:00
vladislav.grechko 457837a255 Fix function invocation mangling rule
Mangle invocations of functions with value classes in signature which
override (directly or indirectly) a method declared in Kotlin code.
Otherwise, NoSuchMethodError is being thrown.

^KT-55945: Fixed
2023-06-15 09:34:21 +00:00
Ivan Kylchik dd264cff50 [IR] Split const folding into necessary one and for optimizations only
In this commit we have a lot of change in test data. This was caused
by the way where we evaluate constants. We split constant evaluation
into two distinct parts: only necessary evaluations for `fir2ir`
(like const val and annotations) and optimizations for lowering.
Now we don't do all constant evaluation on `fir2ir`, but IR
dump is executed after this phase, so test data changed.

#KT-58923
2023-06-14 19:02:39 +00:00
Alexander Korepanov fc898c7620 [JS IR] Use type upper bounds for calculating function signatures
^KT-59239 Fixed
2023-06-14 14:57:15 +00:00
Abduqodiri Qurbonzoda 36924775c8 Add a compiler box test for Boolean.hashCode() 2023-06-14 08:19:47 +00:00
Pavel Kunyavskiy f67f8c393b K2: Added test for data class metadata
#KT-57622 Fixed
2023-06-14 07:09:16 +00:00
Alexander Shabalin da1fde2477 [K/N] Enable custom allocator by default ^KT-55364 2023-06-13 10:22:04 +00:00
Alexander Shabalin 7815eec7c1 [K/N] Rework GC switches with better naming
Additionally, deprecate -Xgc in favour of a new binary option "gc".
This will allow setting gc right in gradle.properties

Merge-request: KT-MR-10498
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2023-06-09 12:04:19 +00:00
Alexander Udalov ccf4a6813c Minor, move kt57353 test to a subfolder 2023-06-08 15:42:27 +00:00
Pavel Kunyavskiy 456783436c [K/N] Fix cast to NativePtr mis-compilation
^KT-59022
2023-06-08 10:40:29 +00:00
Denis.Zharkov c474c54903 FIR2IR: Fix IAE for case of local override of a method with defaults
It was happening because for MyClass.foo we didn't set overriddenSymbols
properly because in ClassMemberGenerator.convertFunctionContent we
used incorrect containingFirClass that was pointing to anonymous class
instead of MyClass.

^KT-58902 Fixed
2023-06-08 08:04:03 +00:00
Pavel Kunyavskiy 15e5adf2b5 Mark reflection related tests as jvm-only 2023-06-07 14:59:38 +00:00
Nikolay Lunyak 45bbd432fc [FIR Native] Stop requiring :dist for native diagnostic test
Native uses its own klib stdlib generated
via `:kotlin-native:dist`.
2023-06-07 05:20:01 +00:00
Ilmir Usmanov 95662234d0 JVM: Support instantiation of annotations with vararg parameters
when they are instantiated without argument.
 #KT-59033 Fixed
2023-06-06 17:27:52 +00:00
Pavel Kunyavskiy 733ca5a358 [K/N] Unmute tests already working on native
Also, add issue references for some tests
2023-06-06 14:29:21 +00:00
Vladimir Sukharev 37adc99b9a [K/N] Don't pass -language_version to the second stage of new test system.
^KT-56182
Merge-request: KT-MR-10414
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-06-05 17:59:16 +00:00
Dmitriy Dolovov cf9aa6a360 [Native][tests] Clean-up in c-interop tests 2023-06-05 12:47:56 +00:00
Dmitriy Dolovov 502cbe8b17 [PL][tests] W/a for broken @Deprecated annotations in existing c-interop KLIBs
^KT-59030
2023-06-05 12:47:56 +00:00
Pavel Kunyavskiy f2520a9cb7 [K/N] Rework is checks and as casts codegeneration
^KT-58707
^KT-59022
2023-06-05 08:56:17 +00:00
Nikolay Lunyak a3cd7d074e [FIR Native] KT-58549: Ensure :dist is run before the native diagnostics
Turns out `:native:tests` prepares `:kotlin-native:dist` only.
2023-06-01 10:27:54 +00:00
Nikolay Lunyak 70605c84df [FIR Native] KT-58549: Get rid of the builtin provider
According to
`FirNativeCodegenBoxTestGenerated.testNestedClassesInAnnotations`,
the annotation
`kotlin.internal.PlatformDependent` is
unresolved reference.

^KT-58549 Fixed
2023-06-01 10:27:54 +00:00
Roman Efremov d2eb4a0abf [FE] Prohibit default arguments in expect declarations actualized via typealias
Cases when default argument inhertied from super class are allowed.

Some tests for default arguments already exist and can be found in
`testData/diagnostics/tests/multiplatform/defaultArguments`, for example
`annotationsViaActualTypeAlias.kt`.

^KT-57614 Fixed

Merge-request: KT-MR-10356
Merged-by: Roman Efremov <Roman.Efremov@jetbrains.com>
2023-05-31 13:14:37 +00:00
Kirill Rakhman 793e3552e7 [FIR] Add tests for K2-only suspend operators get/set/contains
#KT-57169
2023-05-30 16:48:53 +00:00
Alexander Shabalin aea8bac7d2 [K/N] Do not compile for deprecated targets and legacy MM
^KT-56533
^KT-58853
2023-05-30 16:44:58 +00:00
Kirill Rakhman d1ce55cbd2 [FIR2IR] Fix infinite loop between annotation and annotation parameter
When an annotation constructor value parameter is annotated with the
very same annotation, FIR2IR went in an infinite loop when trying
to generate it.
To fix this, the constructor is added to the Fir2IrDeclarationStorage
cache before generating the value parameters.
To accommodate for the missing parameters, the value arguments count
is determined using the FIR.
2023-05-30 15:53:12 +00:00
Denis.Zharkov e4480a1c52 K2: Refine mapping of primitive arrays to JVM descriptor
Earlier, it wasn't really important but after the previous commit
when JvmMappedScope semantics has been changed, we erroneously
started loading `toCharArray` as a member to String because
its jvmDescriptor was computed to "toCharArray()Lkotlin/CharArray",
while hardcoded information that prevents it from loading expect
"toCharArray()[C" there.

^KT-57694 In progress
2023-05-30 10:44:41 +00:00
Alexander Korepanov 8066f1b7d2 [JS IR] Do not copy interface method if base class inherits it
^KT-58599 Fixed
2023-05-30 08:22:43 +00:00
Dmitriy Dolovov a01a6b64ad [PL] Fix: Don't use locations in compiler messages
^KT-58837
2023-05-26 14:03:33 +00:00
Ivan Kochurkin 432c781ff7 [K2, MPP] Fix actualization of fake overrides (fixes a set of bugs in coroutines / ktor)
Split MissingFakeOverridesAdder on FakeOverridesActualizer and ActualFakeOverridesAdder

^KT-57984 Fixed
^KT-58003 Fixed
^KT-58124 Fixed
^KT-57833 Fixed
^KT-58153 Fixed
2023-05-24 14:54:51 +00:00
Ilmir Usmanov a0484de1a6 JVM_IR: Do not copy static init blocks to inline class's constructor
#KT-58593 Fixed
2023-05-24 13:24:47 +00:00
Pavel Kunyavskiy ee1608ec99 [PL] Make call an exception in case of several inherited implementations
^KT-57701
2023-05-24 08:17:59 +00:00
Vladimir Sukharev fde8909e6f [K2/N] IntegerLiteralType coercion only to unsigned integer types
^KT-57484 Fixed

Merge-request: KT-MR-10270
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-24 07:56:14 +00:00
Vladimir Sukharev a534708900 [K2/N] Use FqName to mangle invisible class-like symbol in fake override
^KT-57484

Merge-request: KT-MR-10263
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-24 07:34:11 +00:00
Dmitriy Dolovov 69a1514b14 [PL] Unmute FIR-based tests that pass now 2023-05-23 16:23:41 +00:00
Vladimir Sukharev 6a8981372b [K2/N] Read KDoc strings from LightTree nodes
^KT-56090

Merge-request: KT-MR-9613
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-17 08:12:39 +00:00
Igor Chevdar 39dfb9958b [K/N][tests] Fixed some of lldb tests 2023-05-17 07:28:14 +00:00
Vladimir Sukharev bbe1e708f9 [K2/N] Rewrite mpp tests from old native infra to new
^KT-58543

Merge-request: KT-MR-10065
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-16 08:41:39 +00:00
Dmitriy Dolovov 2b913d7c47 [Native] Don't produce broken @Deprecated annotations in c-interop
#KT-58651
2023-05-16 08:30:29 +00:00
Dmitriy Dolovov 42a8b28337 [Native][tests] Don't track used memory when running in TeamCity 2023-05-12 13:58:18 +00:00
Dmitriy Dolovov 6f249ab615 [Native][tests] Minor. Fix condition for generating intermediate build dir 2023-05-12 13:58:18 +00:00
Dmitriy Dolovov bb5c1eea90 [Native][tests] Minor. Use "default" module name in AbstractNativeObjCExportTest 2023-05-12 13:58:18 +00:00
Dmitriy Dolovov 82984d782a [Native][tests] Unify work with build directories across BB & Simple tests
* Drop 'SimpleTestDirectories' in favor of 'Binaries'
* Make 'Binaries' lazy
2023-05-12 13:58:18 +00:00
Dmitriy Dolovov f7848133a6 [Native][tests] Fix generated framework log file name
$frameworkName.log -> $frameworkName.framework.log
2023-05-12 13:58:18 +00:00
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