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
pyos
cc7187e49b
JVM_IR: cast argument of enumValueOf to String in bytecode
...
Generic functions and implicit casts may return a supertype instead.
#KT-45865 Fixed
2021-04-13 13:24:24 +02:00
Dmitry Petrov
e630e00e99
JVM_IR KT-44744 check accessibility of enum entry 'this'
2021-03-15 17:26:49 +03:00
Alexander Udalov
510b9e6f2a
Move around some codegen box tests
...
In tests merged from boxAgainstJava in 29b96aa1 , some directories were
named slightly differently compared to box, e.g. "property" vs
"properties", "varargs" vs "vararg". This change renames these, moves
some of the tests to more fitting directories, and also renames
"visibility" to "javaVisibility" because it's about Java visibilities
specifically.
2021-02-11 13:50:09 +01:00
Alexander Udalov
401f0ac583
Use TARGET_BACKEND instead of DONT_TARGET_EXACT_BACKEND in box against Java tests
...
"// TARGET_BACKEND: JVM" more clearly says that the test is
JVM-specific, rather than DONT_TARGET_EXACT_BACKEND which excludes all
other backends.
2021-02-11 13:50:08 +01:00
Dmitriy Novozhilov
29b96aa15d
[Test] Properly merge box against java testdata into codegen/box
...
Previous commit about it was 3199ce03 and it was completely wrong
2021-02-04 10:53:50 +03:00
Mikhael Bogdanov
1c612376dd
Disable some android box test
2021-01-28 18:30:48 +01:00
Mikhail Glukhikh
9a5791ad6d
FIR: use correct context for enum entry resolve
...
Now the same resolve context is used for enum entries and
for constructors.
2021-01-18 08:34:46 +03:00
Jinseong Jeon
7cc06489dd
IR: move enum value array initialization out of <clinit>
...
#KT-44192 Fixed
2021-01-07 23:00:37 +01:00
Jinseong Jeon
f8f08e8134
IR: add a test about maximum number of constants in an enum class
2021-01-07 23:00:37 +01:00
Shagen Ogandzhanian
e7dc199ad7
Init enum entries whenever we access companion object or accessing valueOf
...
Fixes https://youtrack.jetbrains.com/issue/KT-43987
Fixes https://youtrack.jetbrains.com/issue/KT-43989
2020-12-30 14:54:34 +01:00
Shagen Ogandzhanian
4f96f9d6a1
[JS IR] Initialize enum fields before accessing them in companion object
...
see https://youtrack.jetbrains.com/issue/KT-43901
2020-12-18 01:54:59 +01:00
Denis Zharkov
a5545b96cb
FIR: Fix ambiguity between current Companion and one from supertypes
...
Companion as qualifier should be found at static scope not a member one
2020-11-10 14:26:54 +03:00
Svyatoslav Kuzmich
fdd7fa5aea
[Wasm] Mute codegen box tests
2020-11-09 16:04:43 +03:00
Ilya Goncharov
4479bf0933
[JS_IR] Enum constructor copy parameters with mapping by index
...
Previously mapping was by name, and there was clash in case of user
parameters named 'name' or 'ordinal'
^KT-39186 fixed
2020-10-23 11:42:43 +03:00
Juan Chen
09acea5548
[FIR]: Set proper classId to enum entries
...
FirVisibilityChecker::isVisible checked if a private declaration can be
accessed at a use site by matching class ids of the private
declaration's owner with the use site's containing class
declarations. When the private declaration is defined in an enum
entry and used in the same entry, its owner class id has the enum
entry name, but the use site is in an FirAnonymousObject, which has
"anonymous" as the class id. This causes visibility check to fail.
This PR fixes owner class ids of declarations defined in enum entries
to be the same as normal anonymous objects.
2020-10-15 14:46:22 +03:00
Mikhail Zarechenskiy
eacc94a89d
Do not hide synthetic properties except isEmpty from Java
...
In order to hide synthetic property isEmpty from JDK 15, there was
added additional logic in 5cc12b49fc but
it also lead to the fact that now it's impossible to call synthetic
property `declaringClass` on `Enum` as it's in the same list as method
isEmpty(). Note that it's questionable behavior, probably we should
also hide `declaringClass` as well but for now we turn it back to
preserve compatibility
#KT-42467 Fixed
2020-10-15 12:26:17 +03:00