Commit Graph

36 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
Jinseong Jeon 4a511c7721 FIR: extend arrayOf call transformation to other variants 2020-06-01 10:45:42 +03:00
Mikhail Glukhikh 7818baff1e [FIR2IR] Fix problem with double-generation of local class members 2020-05-26 11:50:33 +03:00
Mikhail Glukhikh e7e80be34a [FIR2IR] Populate overridden symbols even for !isOverride
Before this commit we considered !isOverride as a sign that
function / field / accessor has no overridden symbols.
However, it's false for deserialized, because isOverride
is always false there.

This commit fixes 68 BB tests but breaks 25 BB tests (not yet muted)
2020-05-14 13:40:36 +03:00
Mikhail Glukhikh 1500131eb0 [FIR2IR] Re-use applyCallArguments for IrDelegatedConstructorCall 2020-04-13 17:09:05 +03:00
Jinseong Jeon 3e6b38a921 [FIR] Fix type reference for 1st arg of GetClassCall 2020-04-02 12:42:50 +03:00
Mikhail Glukhikh 697006d782 [FIR2IR] Re-use receiver application logic in callable ref conversion 2020-03-30 16:23:10 +03:00
Mikhail Glukhikh 3d17ce05b5 [FIR] Introduce FirResolvedArgumentList with argument-parameter mapping
#KT-36345 Fixed
2020-03-11 22:08:59 +03:00
Mikhail Glukhikh 1812b490a1 FIR: set anonymous object constructor return type properly 2020-03-11 16:01:57 +03:00
Mikhail Glukhikh ed6c9e67a1 FIR2IR: convert qualifiers to companion objects, if any 2020-03-10 15:19:34 +03:00
Mikhail Glukhikh 940567b8bd FIR2IR: set enum class modality properly for complex entries case 2020-03-04 16:55:33 +03:00
Anton Bannykh 9a971172c9 JS: fix object expression constructor delegation to secondary constructors with default arguments (KT-30517 fixed) 2019-12-15 15:21:23 +03:00
Mark Punzalan 9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Ting-Yuan Huang 74e8c7c1c5 JVM_IR: generate default constructor
Quoted from https://kotlinlang.org/docs/reference/classes.html

"On the JVM, if all of the parameters of the primary constructor have
 default values, the compiler will generate an additional parameterless
 constructor which will use the default values. This makes it easier to
 use Kotlin with libraries such as Jackson or JPA that create class
 instances through parameterless constructors."
2019-05-30 18:53:27 +02:00
Ting-Yuan Huang 0aee2d0568 Fix signature generation for calls to enum and inner class constructors
The synthesized arguments caused the size of default value mask off by
one when it is close to the boundary of Int.SIZE, which in turn
resulted in wrong signature at call sites.
2019-05-23 12:29:57 +02:00
Anton Bannykh 3a105debb3 [JS IR BE] fix default arguments lowering 2018-10-18 14:25:48 +03:00
Mikhael Bogdanov bbc5fa4705 Perform InnerClassLowerings after CallableReferenceLowering 2018-08-09 14:22:51 +03:00
Mikhael Bogdanov 2884d728fd Mute/unmute jvm_ir tests 2018-08-01 12:29:24 +02:00
Mikhael Bogdanov e149cbe852 Mute failed jvm ir tests 2018-06-28 12:26:41 +02:00
Svyatoslav Scherbina ba3411e7d7 JS IR: unmute tests 2018-06-22 13:36:47 +03:00
Anton Bannykh 04a2ffc0c1 JS IR: unmute tests 2018-06-21 13:27:17 +03:00
Anton Bannykh 96355e2732 JS IR: mute codegen box tests automatically 2018-06-09 19:15:38 +03:00
Anton Bannykh 03e46ce0ca JS: more default arguments fixes (KT-24413, KT-21968 fixed)
MPP-related:
* inherited from interfaces
* inherited body from interface
* default arguments in an interface, implemented by a class delegate
* super call of a method with default argument

Also:
* inheritance from an interface and another interface descendant (KT-21968)
* inheritance through an intermediate interface
2018-05-28 15:27:21 +03:00
Ilya Matveev a5e4e0284e Mute some box tests for native backend
This patch mutes the following test categories:
   * Tests with java dependencies (System class,
     java stdlib, jvm-oriented annotations etc).
   * Coroutines tests.
   * Reflection tests.
   * Tests with an inheritance from the standard
     collections.
2017-03-10 19:59:37 +03:00
Mikhail Zarechenskiy d7093db5c5 Allow to use emptyArray in annotation as argument
#KT-14236 Fixed
2017-02-07 14:07:20 +03:00
Zalim Bashorov 596f3364c6 Automatically mute failed tests 2016-11-09 21:41:12 +03:00
Alexander Udalov 06a67e6602 Merge boxWithStdlib testData into box, delete BoxWithStdlib test 2016-03-09 10:25:38 +03:00
Denis Zharkov bae3320d52 Get rid of deprecated annotations in testData 2015-09-18 10:14:32 +03:00
Mikhail Glukhikh b2653ad1e9 Deprecated enum syntax removed: most compiler tests 2015-08-10 16:24:12 +03:00
Denis Zharkov e3c3af6aab Change MISSING_CONSTRUCTOR_KEYWORD severity to error
And adjust testData
2015-06-12 11:23:13 +03:00
Pavel V. Talanov 06916d98c6 default -> companion: replace all mentions of default and default object 2015-03-17 15:47:39 +03:00
Pavel V. Talanov 59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Alexander Udalov 8b918ef1aa Add regression tests for obsolete issues
#KT-1291 Obsolete
 #KT-2895 Obsolete
 #KT-3060 Obsolete
 #KT-3298 Obsolete
 #KT-3613 Obsolete
 #KT-3862 Obsolete
2014-02-13 04:43:53 +04:00
Alexander Udalov 7ce62a5b64 Remove generated codegen tests, move all testData to box/
A single test file will be generated out of box/ directory
2013-01-28 18:20:21 +04:00