Commit Graph

28 Commits

Author SHA1 Message Date
Alexander Udalov 1588b07472 Tests: unmute light analysis tests passing with JVM_IR 2023-06-22 17:10:51 +02:00
Alexander Udalov 4d7506bae3 JVM: enable indy lambdas in some tests explicitly
To simplify enabling of indy lambdas by default.
2023-04-28 21:34:19 +00:00
Alexander Udalov 562b27db4e JVM IR: initialize enum entries without invokedynamic
#KT-57316 Fixed
2023-03-24 13:38:32 +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
Dmitriy Novozhilov 88efa6bfb6 Update tests after switching to LV 1.9 2023-01-30 09:29:57 +00:00
Mikhail Glukhikh b327f5c731 Substitute type variables properly in ConeOverloadConflictResolver
#KT-46187 Fixed
2022-03-23 09:54:46 +00:00
Dmitry Petrov 12d8b189a9 JVM_IR KT-50856 fix generic signature for SAM proxy function 2022-01-20 10:41:55 +00:00
Dmitry Petrov 2a263eca65 FIR2IR strip annotations from IrConst type 2021-11-23 06:34:03 +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
Dmitry Petrov 916379c0e7 JVM KT-49613 use adapter for indy reference to protected constructor 2021-11-10 19:37:27 +03:00
Dmitry Petrov 005d3b1f6f JVM_IR pass reified type parameters in indy SAM conversion proxy 2021-10-12 15:56:33 +03:00
Dmitry Petrov 40fe67880b JVM_IR wrap function into a proxy if indy SAM-conversion becomes valid 2021-10-12 15:56:31 +03:00
pyos c522543e44 FIR: mute a blackbox test that fails due to another case of #3747 2021-09-06 13:11:17 +03:00
Dmitry Petrov ba00709e4d JVM_IR KT-46839 lower varargs for *arrayOf function references 2021-05-21 22:06:52 +03:00
Dmitry Petrov c0fbdb1535 JVM_IR KT-46840 don't generate special function references with indy 2021-05-20 21:13:17 +03:00
Dmitry Petrov 83e3a702c5 JVM_IR KT-46408 properly map fake overrides in method handles 2021-04-30 22:24:02 +03:00
Dmitry Petrov 72804d2e8c JVM_IR KT-45779 don't generate intrinsic method refs via invokedynamic 2021-04-30 12:45:11 +03:00
Dmitry Petrov 46d5e974df JVM_IR KT-46160 don't use LambdaMetafactory for mutifile class members 2021-04-19 19:32:34 +03:00
Dmitry Petrov 7f4da93cc3 JVM_IR KT-45998 protected companion object member accessors with indy 2021-04-19 15:41:21 +03:00
Dmitry Petrov 9a4a39e680 JVM_IR KT-45998 fix protected companion object member accessors
Also, make sure it works with indy-based SAM conversions.
2021-04-19 15:41:19 +03:00
Dmitry Petrov f59b49db68 JVM_IR KT-45967 generate accessor for argument of indy intrinsic
TODO handle inaccessible constructors gracefully
2021-04-12 17:36:24 +03:00
Dmitry Petrov 162363a324 JVM: CHECK_BYTECODE_TEST directive + use it in INVOKEDYNAMIC tests 2021-04-12 16:43:15 +03:00
Dmitry Petrov 466e7b60b0 JVM_IR fix receiver type for fake overrides 2021-03-29 19:04:42 +03:00
Dmitry Petrov 9e30ddd12e JVM_IR KT-45581 generate H_INVOKEINTERFACE for interface method handles 2021-03-19 18:57:21 +03:00
Dmitry Petrov 387d84f826 JVM_IR indy-SAM: KT-45069 box lambda 'Unit' return type if needed 2021-02-20 15:07:24 +03:00
Dmitry Petrov c629ba5a3c JVM_IR indy-SAM: function reference to Java interface 2021-02-19 12:04:30 +03:00