Commit Graph

12 Commits

Author SHA1 Message Date
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
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
Steven Schäfer 057ead358c JVM: Add FILE target to the JvmSynthetic annotation (#4149) 2021-03-11 13:33:07 +01:00
Steven Schäfer 4e03b1e05f JVM: Allow the JvmSynthetic annotation on file classes (KT-41884) 2020-11-17 22:06:19 +01:00
pyos 40696f65c3 JVM_IR: generate WhenMappings for enum ordinal subjects 2019-05-13 19:09:07 +03:00
pyos 3fdcf8376f Add IR equivalent of the WriteFlags test 2019-04-09 08:11:29 +02:00
Mikhael Bogdanov 004ff86bec Fix for KT-14774: Incorrect inner class modifier generated for sealed inner classes
#KT-14774 Fixed
2016-12-16 11:22:40 +01:00
Michael Bogdanov 0274ce4619 Always generate ACC_SUPER flag for all classes; Fix for KT-10260: java.lang.VerifyError in Android 4.x when Instant Run is used
#KT-10260 Fixed
2016-01-11 09:55:56 +03:00
Dmitry Jemerov 4bdf598bfe compiler testdata: s/trait/interface 2015-05-12 19:43:17 +02:00
Alexander Udalov 18c59d5495 Treat anonymous objects as classes (ClassKind.CLASS)
They're not objects per se, i.e. they're not singletons
2013-12-02 19:55:19 +04:00
Natalia.Ukhorskaya 4e98ddda96 Add test for check access flags in class file (refactor WriteAccessFlagTest) 2012-10-16 14:44:25 +04:00