Alexander Udalov
690322b203
Add flag -Xno-new-java-annotation-targets
...
Do not generate TYPE_USE/TYPE_PARAMETER Java annotation targets when
this flag is specified.
#KT-53712 Fixed
2022-08-29 13:43:49 +02:00
Alexander Udalov
a09fd45ade
Do not generate TYPE_USE/TYPE_PARAMETER when compiling against JDK 1.6
...
#KT-53712
2022-08-29 13:43:32 +02:00
Artem Kobzar
dbda8dcad1
[K/JS] test: add @file:JsExport tests for each @JsExport test + auto-generate TypeScript export tests.
2022-08-26 09:51:59 +00:00
Pavel Mikhailovskii
d65775ca1a
KT-47475 Do not copy InnerClass attribute for WhenMapping classes
2022-08-25 21:41:14 +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
Ilya Gorbunov
6aff3c6d07
Update misc test data after introducing rangeUntil member #KT-52933
2022-08-24 22:22:54 +00:00
Ilya Gorbunov
baf7cbb3ac
Add 'until' function for unsigned arguments to interpreter test helpers #KT-52933
...
Required to evaluate rangeUntil members of unsigned types.
2022-08-24 22:22:54 +00:00
Ilya Gorbunov
203a00151d
rangeUntil member operator in builtins #KT-52933
2022-08-24 22:22:53 +00:00
Dmitriy Novozhilov
66117367ad
[FIR] Transform context receivers on properties during type resolution stage
...
^KT-53706 Fixed
2022-08-24 15:36:42 +00:00
Pavel Mikhailovskii
18e61315f4
KT-27936 Generate InnerClasses attributes
2022-08-23 22:06:10 +00:00
Svyatoslav Scherbina
0021333b91
[Native][test] Unmute more passing tests
...
They now pass likely due to better handling of reflection information
when renaming packages when grouping tests (see cee0731).
2022-08-23 17:05:59 +00:00
Sergej Jaskiewicz
d57ddc5f83
[JS IR] Generate debug info for JS injections
...
Also, fix the JS parser to collect the "correct" debug info
(see the note in `translateJsCodeIntoStatementList`)
#KT-53361 Fixed
2022-08-22 23:15:52 +00:00
Steven Schäfer
a90c4d5dd5
JVM IR: Optimize equality on class literals
2022-08-23 00:14:11 +02:00
Rick Clephas
0a8cefc8a5
[FIR] Add NativeObjCRefinement checkers
2022-08-22 16:10:44 +02:00
Rick Clephas
203af3afdd
[FE 1.0] Add NativeObjCRefinement checkers
2022-08-22 16:10:44 +02:00
Mikhail Glukhikh
b78106e437
Don't report INFERRED_..._INTO_EMPTY_INTERSECTION with explicit arguments
2022-08-19 14:01:38 +00:00
Mikhail Glukhikh
a6b90fcb8e
Add a test with false positive "inferred into empty intersection"
...
Related to KT-50232
2022-08-19 14:01:37 +00:00
Mikhail Glukhikh
d3648bce0c
Run LoadJava.CompiledKotlin test group with stdlib if some enum is inside
...
This commit makes compiler tests working similarly to ResolveByStub IDE tests.
2022-08-19 10:08:11 +00:00
Mikhail Glukhikh
fb1c80a7c9
K2: discriminate synthetic 'Enum.entries' during resolve
2022-08-19 10:08:11 +00:00
Mikhail Glukhikh
68ca453467
K2: don't report REDECLARATION on Enum.entries
2022-08-19 10:08:10 +00:00
Mikhail Glukhikh
730de8fd7c
K1/K2: add test for enum class with 'entries' entry
2022-08-19 10:08:09 +00:00
Mikhail Glukhikh
8a4105e542
IR: fix origin of default getter of Enum.entries synthetic property
2022-08-19 10:08:08 +00:00
Arseniy Terekhov
c0ab367281
[FIR] DeprecationProvider: fix test, remove FIR_IDE_IGNORE
2022-08-19 07:37:55 +00:00
Ivan Kylchik
3027ea9551
Add new jvm compilation key ignoreConstOptimizationErrors
...
This key suppose to be a workaround in keys if something goes
wrong in ir interpreter.
2022-08-18 16:50:06 +00:00
Ivan Kylchik
4e740e91f2
Safely unfold callable reference instruction in interpreter
...
There was an assumption that if receiver exists then parameter will
also exist. This is not true for references marked with `JvmStatic`.
Later in `JvmStaticInObjectLowering` dispatch receiver may be dropped.
2022-08-18 16:50:05 +00:00
Pavel Kunyavskiy
5034581788
[K/N] Fix references for inline function
...
Corresponding lowering creating wrappers from JS Backend was used.
Also, the lowering was changed to create local function, instead of
normal one in outer scope, as a lot of logic from local declarations
lowering should be duplicated otherwise for correct type parameters
handling.
^KT-38535
2022-08-18 13:23:10 +00:00
Ilya Goncharov
2f75ea585e
[JS, Frontend] Not report warning with non-exportable super type
...
^KT-53539 fixed
2022-08-18 12:46:40 +00:00
Alexander Udalov
45abea5b0a
Use platform class loader in 'kotlin' runner on JDK 9+
...
#KT-46312 Fixed
2022-08-17 22:23:10 +02:00
Iven Krall
ec8da2033c
KT-8263: Conditional operators are not parsed correctly
2022-08-16 10:00:54 +00:00
Iven Krall
2053363def
KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing
2022-08-16 10:00:53 +00:00
Simon Ogorodnik
513af2dfbc
FIR. Refactor smart-cast representation in FIR tree
...
Make smart-casts non-transparent expression without delegation
to underlying FirQualifiedAccessExpression, as children delegation in
fir tree has unclear semantics
Remove two different kinds of tree nodes for smart-casts
2022-08-15 21:46:11 +00:00
Abduqodiri Qurbonzoda
0942a414c8
Fix typeAnnotationTarget6.kt codegen box test
2022-08-13 01:33:48 +03:00
Abduqodiri Qurbonzoda
de775ad728
Remove unsignedIntCompare_before.kt test data
2022-08-13 01:33:47 +03:00
Vsevolod Tolstopyatov
e32e5c26a4
[reflect] Fix flaky tests that depend on Reflection.clearCaches()
...
* Use ReflectionFactoryImpl as single point of synchronization
* Synchronize all cache-sensitive tests on it in order to be robust in parallel test runners
* Remove redundant cache clear after each test
Merge-request: KT-MR-6842
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com >
2022-08-12 14:10:08 +00:00
Vsevolod Tolstopyatov
22e26d0756
Move EnumEntries LVS to 1.9
...
* Also cleanup tests to avoid using obsolete WITH_RUNTIME
2022-08-12 09:35:32 +00:00
Mikhail Glukhikh
7333589663
K1/K2: add Enum.entries unconditionally and filter them out in tower
...
Before this commit, we added Enum.entries only in case when
LanguageFeature.EnumEntries was ON (with an exception in K1/Java case).
In this commit we add Enum.entries unconditionally, and in case
the language feature is OFF we filter them out during tower resolve.
2022-08-12 09:35:27 +00:00
Vsevolod Tolstopyatov
0a5b3f1e13
[JVM IR] Adjust testData to address new static Enum.entries member
2022-08-12 09:35:26 +00:00
Mikhail Glukhikh
12e8b1d844
K1: add support for Enum.entries synthetic property (see KT-48872)
...
#KT-53270 Fixed
2022-08-12 09:35:24 +00:00
Vsevolod Tolstopyatov
c0f81cbc45
[JVM] Improve code coverage of EntriesMapping
...
Ensure that when .entries is accessed from an inline function body
or lambda argument, EntriesMapping are properly generated and used
without excessive mappings and duplicated fields
#KT-53236
2022-08-12 09:35:24 +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
Vsevolod Tolstopyatov
93f17a2b86
[FIR] Support static getters along with fake Enum.entries declaration in FIR
...
#KT-48872
2022-08-12 09:35:18 +00:00
Ivan Kylchik
45b89de9f4
Optimize ir interpretation of Enum.name
...
There is no need to create honest object in case of such simple
calculation. Furthermore, it can be harmful if enum class has
non-constant initializer or property.
#KT-53480 Fixed
2022-08-11 18:55:30 +03:00
Mikhail Glukhikh
81e1131441
SubclassOptInRequired: add extra test about inheritance and superseding
2022-08-11 14:05:09 +00:00
Mikhail Glukhikh
80a9f22052
Add applicability checks & tests for SubclassOptInRequired
2022-08-11 14:05:09 +00:00
Mikhail Glukhikh
76aaecbdf0
Add/fix extra cases for #KT-41886 Fixed
2022-08-11 14:05:08 +00:00
Mikhail Glukhikh
7d3368da58
K2: report errors related to SubClassOptInRequired annotation
...
Related to KT-41886
2022-08-11 14:05:08 +00:00
Mikhail Glukhikh
c67c5cad27
K1: report errors related to SubClassOptInRequired annotation
...
Related to KT-41886
2022-08-11 14:05:07 +00:00
Pavel Mikhailovskii
8ba80b4b7b
KT-1436 Allow break/continue in inlined lambdas
2022-08-11 10:38:23 +00:00