Abduqodiri Qurbonzoda
295fdc36ce
Enum.valueOf throws inconsistent exception across multiple platforms #KT-35116
2023-06-16 22:18:20 +00:00
Abduqodiri Qurbonzoda
d6867917c9
Enum entry hashCode() should return identity hash code #KT-59223
2023-06-16 22:18:20 +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
Artem Kobzar
302623c388
[K/JS] Skip static members in fake overrides generating ^KT-58396 Fixed
2023-05-11 12:32:21 +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
Xin Wang
7b4e6bae0e
JVM: ensure the $ENTRIES field is initialized before use
...
#KT-57784 Fixed
2023-05-04 23:11:39 +02:00
Dmitriy Novozhilov
7958a9debd
[FIR2IR] Correctly generate delegating constructor call for secondary constructors in enums
...
^KT-56927 Fxied
2023-04-27 13:35:14 +00:00
Alexander Udalov
d3be38476a
Merge K2 box tests to main box tests
2023-03-27 10:32:19 +00:00
Svyatoslav Kuzmich
a99ea1d3ce
[Wasm] Support enumValues and enumValueOf functions
...
^KT-57276 Fixed
Merge-request: KT-MR-9169
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com >
2023-03-13 14:13:31 +00:00
Nikolay Lunyak
bcfafc601e
Add EnumEntries to minimal-stdlib-for-tests
...
This change allows to revert adding `WITH_STDLIB` directive
to tests which happened at `a9343aeb`.
Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com >
2023-03-02 10:23:38 +00:00
Nikolay Lunyak
a9343aeb7d
[FIR] KT-55840: Ensure everything actually works
...
This inconsistency is present due to not using the `// WITH_STDLIB`
in the above tests. When K1 creates the enum, it tries to generate
`entries()`, and for that it tries to load `kotlin.enums.EnumEntries`,
but this is actually an unresolved reference. K1 silently swallows it,
and proceeds.
The reason K2 doesn't fail is that in order to generate `entries()` it
simply creates the necessary `ConeClassLikeType` with the desired
`classId` instead of loading the whole `ClassDescriptor`.
The reason we can still observe `$ENTRIES` and `$entries` in K1
is because they are generated during the JVM codegen, and it
only checks if the `EnumEntries` language feature is supported. It
doesn't check if the `entries` property has really existed in IR
(by this time it's expected to have already been lowered to the
`get-entries` function - that's why "has ... existed").
The reason why the codegen doesn't fail when working with
`kotlin.enums.EnumEntries` is because it creates its
own `IrClassSymbol`.
^KT-55840 Fixed
Merge-request: KT-MR-8727
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com >
2023-02-10 16:57:51 +00:00
Mikhail Glukhikh
6d642c88f5
FIR2IR: make enum with abstract members from interfaces abstract
...
Related to KT-55828
2023-02-02 10:53:20 +01:00
Vladimir Sukharev
fbcb07d375
[K2/N] KT-55828 Enable already fixed and accidentally disabled tests
...
Merge-request: KT-MR-8605
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-02-01 10:44:26 +00:00
Dmitriy Novozhilov
88efa6bfb6
Update tests after switching to LV 1.9
2023-01-30 09:29:57 +00:00
Vladimir Sukharev
ff6ea40056
KT-55828: Disable failed tests for K2 Native in OPT mode
...
Merge-request: KT-MR-8229
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-01-09 15:09:04 +00:00
Vladimir Sukharev
924898afb7
[K/N] KFC-446: K2 platform: Native alpha
...
Merge-request: KT-MR-7905
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-01-04 16:10:40 +00:00
Ivan Kochurkin
8883de3f00
[FIR] Don't resolve Enum.declaringClass and Enum.getDeclaringClass
...
^KT-53946 Fixed
2022-11-23 18:29:29 +00:00
Ilya Chernikov
7e4ee399c8
FIR JS: temporarily mute remaining codegen tests
2022-11-12 16:28:25 +01:00
Ilya Chernikov
78ca733c38
FIR JS: add K2 variants of all other JS tests
...
except tests that are not possible to add without some modifications in
the test infra. See todos on the commented-out test declarations
2022-11-12 16:28:24 +01:00
Ilya Chernikov
4e4511bba2
FIR2IR: convert enums with non-primary default ctor correctly
...
see added test for example
2022-11-12 16:28:24 +01:00
Ilya Chernikov
44cce3ad52
FIR JS: mute remaining tests for now
2022-11-12 16:28:23 +01:00
Ilya Chernikov
5b3816cce5
Test infra: refactor IGNORE_BACKEND directive
...
treat it as a general one, introduce *_K1 and *_K2 variants for
more specific ignoring
2022-11-12 16:28:23 +01:00
Artem Kobzar
8b826a865b
[K/JS, K/WASM] feat(Enum.entries): add support of new enum static field for JS and WASM.
2022-08-29 16:04:12 +00:00
Pavel Kunyavskiy
895a8ff149
[K/N] Basic support of Enum.entries for Native
...
No forward compatibility yet, with old klib IR linker will fail.
^KT-53324
2022-08-25 12:40:30 +00:00
Vsevolod Tolstopyatov
e3bff290bd
[JVM] Lower .entries calls on Kotlin enums
...
Leveraging the same mechanism with $EntriesMapping as Java enums.
Old (compiled with LV/AV < 1.8) enums are detected by looking for
static special <get-entries> method that cannot be introduced on
Kotlin enums otherwise
#KT-53236
2022-08-12 09:35:22 +00:00
Vsevolod Tolstopyatov
a12a31ce68
[JVM] Lower .entries calls on Java enums
...
#KT-53236
2022-08-12 09:35:21 +00:00
Vsevolod Tolstopyatov
e708809e55
[JVM] Support Enum.entries for enums being compiled with Kotlin 1.8+
...
#KT-53236
2022-08-12 09:35:20 +00:00
Mads Ager
59c2bde10a
[K/N] Unmute passing tests.
2022-08-01 08:57:16 +00:00
Mikhail Glukhikh
983fa4c8c7
FIR: add temporary access to Enum.getDeclaringClass (see KT-49653)
2022-01-27 17:27:39 +03:00
Igor Yakovlev
e58d4163ad
[WASM] Add std methods for collections
2022-01-05 13:12:32 +01:00
Mikhail Glukhikh
0058d7e3d6
Add BB test for problem fixed with c2ab91d0
2021-11-24 15:30:33 +03:00
Dmitry Petrov
2179987de7
FIR2IR fix enum special methods generation
2021-11-23 06:34:33 +00:00
Mikhail Glukhikh
cf104c8433
FIR: add status line to all failing black box tests
2021-11-20 03:37:31 +03:00
Ivan Kylchik
c7435ba760
Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
...
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Sergej Jaskiewicz
9e5520bba8
[JS IR & WASM] Fix executing init blocks for enums with nested objects
2021-10-18 13:37:16 +00:00
Svyatoslav Kuzmich
3f8dce4b53
[JS IR] Support per-file mode and ES modules
2021-10-12 23:29:39 +03:00
Artem Kobzar
dca4a8e722
fix(KT-45056, KT-47516): use enum as an IR class instead of enum entity class.
2021-10-08 16:21:49 +00:00
Svyatoslav Kuzmich
aa5f98f919
[JS] Remove KJS_WITH_FULL_RUNTIME for tests that already have WITH_RUNTIME
2021-10-07 22:36:18 +03:00
Svyatoslav Kuzmich
6eb81517a0
[Wasm] Unmute passed Wasm tests
2021-10-02 06:14:35 +00:00
Svyatoslav Kuzmich
c88cde2f8b
[Wasm] DONT_TARGET_WASM_BACKEND => IGNORE_BACKEND in testdata
2021-10-02 06:14:35 +00:00
Svyatoslav Kuzmich
5c05ff48ff
[Wasm] Copy property reference lowering from K/N
2021-09-27 17:07:39 +03:00
Igor Yakovlev
41a69ad388
[WASM] Add receiver capturing to callable references
2021-09-20 19:08:22 +03:00
Igor Laevsky
00f61978b8
WASM: Enable exception handling tests
2021-09-08 19:56:38 +03:00
Igor Laevsky
d99473fe4d
WASM: Canonicalize catches without finally blocks
2021-09-08 19:56:35 +03:00
Roman Artemev
09d30c91bf
[JS TESTS] Disable mangler checker in tests
2021-07-01 17:40:41 +03:00
pyos
26e3237b8c
JVM_IR: never rename public/protected fields
...
And if that causes a platform declaration clash, that's not a problem
that can be solved without breaking the ABI anyway.
#KT-47412 Fixed
2021-06-24 17:41:06 +03:00
Steven Schäfer
60bc0f4baf
IR: Lower shared variables in enum entries (KT-46605)
2021-05-18 16:55:38 +02:00
Steven Schäfer
6aaff9dfb7
JVM IR: Handle overloaded values functions in MappedEnumWhenLowering
...
Fixes KT-46579.
2021-05-13 13:24:32 +02:00
Igor Chevdar
7dcdbf283b
[box-tests] Added test
2021-04-26 11:53:27 +05:00
Andrey Zinovyev
27766c2575
[FIR] Consistent isLocal for objects inside Enum entries
2021-04-20 18:12:51 +03:00