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
Jinseong Jeon
c744dfba9c
FIR: distinguish anonymous object as enum entry when scoping
...
so that `this` reference with the enum entry name as label can be
resolved
2020-08-02 18:06:15 +03:00
Jinseong Jeon
da6e96f4f1
FIR2IR: don't declare dispatch receiver for local functions
2020-07-28 13:43:10 +03:00
Juan Chen
d163853c97
[FIR] add support for implementation by delgation
...
This commit handles "subclass: super-interface by delegate-expression".
During Psi2Fir, for each delegate, we add to the subclass a synthetic
field (which has type super-interface), and an assignment of the
delegate-expression to the synthetic field in the primary constructor,
so that the delegate-expression can be resolved and transformed along
the way.
During Fir2Ir, we look up delegatable members from the super-interface
and generate corresponding functions/properties for the subclass.
TODO: support for generic delegatable members and generic
super-interface.
2020-07-08 09:42:24 +03:00
Jinseong Jeon
44d0af8597
FIR2IR: handle 'this' as reference to outer object
2020-07-03 12:53:57 +03:00
Igor Chevdar
3634ad2d54
Added a test
2020-06-18 12:44:48 +05:00
Mikhail Glukhikh
3567880303
[FIR] Consider enum entry nested classes as local
2020-06-08 12:11:33 +03:00
Vitaly
fe047f9b47
[JS BE] mutes tests for JS_IR_ES6, which muted for JS_IR
2020-05-27 00:32:56 +03:00
Jinseong Jeon
ef09850df8
FIR2IR: set superQualifierSymbol for super call
2020-04-27 11:50:26 +03:00
Juan Chen
e954aea4cc
[FIR2IR] Support argument reordering of constructor calls
2020-04-13 17:09:04 +03:00
Mikhail Glukhikh
a93c7a39e0
[FIR] Provide object [dispatch] && callable reference receivers properly
2020-04-09 15:22:56 +03:00
Jinseong Jeon
3e6b38a921
[FIR] Fix type reference for 1st arg of GetClassCall
2020-04-02 12:42:50 +03:00
Jinseong Jeon
078cf02c8a
FIR: Provide dispatch receiver for 'field' according to property type
2020-03-30 16:57:53 +03:00