Vladimir Sukharev
604c8edd1c
[K/N] Fix kt53261_* tests to be dummy in debug mode
...
^KT-62157 Fixed
Merge-request: KT-MR-12720
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-10-25 16:07:01 +00:00
Ilya Goncharov
065733e87c
[FIR] Add UNINITIALIZED_ENUM_ENTRY on access qualifier of local enum
...
^KT-59967 fixed
2023-10-25 15:36:11 +00:00
Jinseong Jeon
1ccb085e68
SLC: use fully expanded type when computing nullability
...
^KT-62757 fixed
2023-10-25 14:59:50 +00:00
Alejandro Serrano Mena
f227447837
[K2] Disallow named functions as expressions
...
^KT-62573 Fixed
^KT-59945 Fixed
2023-10-25 13:24:30 +00:00
Dmitrii Gridin
3941b05909
[FIR] do not transform annotations on delegated property accessors during implicit type phase
...
^KT-62874 Fixed
2023-10-25 08:59:15 +00:00
Dmitrii Gridin
1b636bf450
[FIR] add tests on annotations for delegated getter during implicit type phase
...
^KT-62874
2023-10-25 08:59:15 +00:00
Ivan Kochurkin
d50c6f1b6d
[FIR] Fix missing USELESS_CAST
...
`FirUselessTypeOperationCallChecker` always checks exact types matching for `as` operator
Simplify code of cast checker and utils
^KT-56629 Fixed
^KT-56615 Fixed
^KT-59820 Fixed
2023-10-24 20:59:56 +00:00
Dmitrii Gridin
2f8026f335
[LL FIR] add missed diagnostic tests for scripts
...
^KT-62840
^KT-62841
^KT-62861
2023-10-24 19:32:54 +00:00
Mikhail Glukhikh
3cb9396b20
K2: prefer derived class sources for callable copies (e.g. fake overrides)
2023-10-24 17:08:40 +00:00
Mikhail Glukhikh
4b2a122f80
FIR2IR: make delegate field/accessors sources closer to PSI2IR
...
#KT-59864 Fixed
2023-10-24 17:08:40 +00:00
Mikhail Glukhikh
47fec1a113
K2: use similar sources for if branches (PSI/LT)
...
Related to KT-59584
2023-10-24 17:08:40 +00:00
Mikhail Glukhikh
21b4ce050c
K2: add source range test to ensure #KT-59584 Fixed
2023-10-24 17:08:40 +00:00
Mikhail Glukhikh
920b0bfe63
FIR2IR: use SYNTHETIC_OFFSET for data class generated members
2023-10-24 17:08:40 +00:00
Mikhail Glukhikh
a9894b1842
K2: use derived class sources for callable copies if base callables have no sources
...
Related to KT-60155
2023-10-24 17:08:40 +00:00
Vladimir Sukharev
8395018de8
[FIR] Fix disappeared INVALID_CHARACTERS_NATIVE_ERROR
...
https://youtrack.jetbrains.com/issue/KT-60003/K2-Disappeared-INVALIDCHARACTERSNATIVEERROR
^KT-60003 Fixed
Merge-request: KT-MR-12686
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-10-24 16:28:30 +00:00
Svyatoslav Kuzmich
aeeb5d5c48
[Wasm] Disallow dynamic type in K2 (KT-56849)
2023-10-24 10:54:58 +00:00
Ivan Kochurkin
bb937a8a21
[FIR] Initialize annotations in FirErrorTypeRef
...
^KT-62447 Fixed
^KT-62628 Fixed
2023-10-24 10:53:33 +00:00
Dmitrii Gridin
ec3cfdefcb
[LL FIR] add missing file node to control flow graph
...
The file
^KT-62834 Fixed
2023-10-24 10:30:55 +00:00
Dmitrii Gridin
a1ee07603a
[FIR] add cfg dump to script test
...
^KT-62834
2023-10-24 10:30:55 +00:00
Dmitrii Gridin
2eb761adae
[LL FIR] generate resolution tests over codegen/box testData
...
Such testData can contain contract violations and other resolution
problems, so we should check them as well
^KT-62776
^KT-62832
^KT-62834
^KT-62836
2023-10-24 10:30:55 +00:00
Dmitrii Gridin
5a786e25c2
[codegen] testData: move WITH_STDLIB to global scope
2023-10-24 10:30:55 +00:00
Dmitrii Gridin
09a1df9ee5
[codegen] testData: add missing directory structure for Java classes
2023-10-24 10:30:55 +00:00
Xin Wang
51325ba630
[IR] Implement getContextReceiverParameters for IrBasedPropertyDescriptor
...
Fixes: KT-59590
2023-10-24 10:07:08 +00:00
Kirill Rakhman
65ff684589
[FIR] Don't discriminate generics in conflict resolution for callable references
...
#KT-59430 Fixed
2023-10-24 07:27:07 +00:00
Svyatoslav Kuzmich
2694326ef8
[Wasm] Add EXTERNAL_TYPE_EXTENDS_NON_EXTERNAL_TYPE K2 diagnostic
...
Prohibit extending non-external types with external types (same as K1)
Issue KT-56849
2023-10-23 17:31:04 +00:00
Vladimir Sukharev
e43b634122
[K/N] Migrate most simple filecheck tests to new infra
...
^KT-62157
Merge-request: KT-MR-12376
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-10-23 10:07:28 +00:00
Anastasia.Nekrasova
9acae3b0df
[K2] Disappeared ITERATOR_MISSING
...
^KT-59986
2023-10-23 07:56:02 +00:00
Ivan Kylchik
69a888b431
[FIR] Add diag test to verify const checker in Java world
...
Currently, this test is not working for FIR.
#KT-57802 Fixed
2023-10-20 16:33:21 +00:00
Ivan Kylchik
4334ae9da9
[FIR] Add JvmName to the list of REQUIRED_ANNOTATIONS
...
We need to resolve `JvmName` as soon as possible because
it can be analyzed in `FirJavaElementFinder` to create
the correct class stub.
#KT-57802
2023-10-20 16:33:20 +00:00
Ivan Kylchik
a45bb8d92b
[FIR] Find the correct FIR file in Java finder for file with JvmName
...
#KT-57802
2023-10-20 16:33:20 +00:00
Ivan Kylchik
8c7c44f9f5
[FIR] Fix evaluation of Java properties for Char and String types
...
#KT-57802
2023-10-20 16:33:20 +00:00
Ivan Kylchik
7935b2bdb1
[FIR] Allow to evaluate top level const properties in Java world
...
#KT-57802
2023-10-20 16:33:20 +00:00
Ivan Kylchik
886ef1a4b4
[FIR] Support the simple case of java field interpretation
...
#KT-57802
2023-10-20 16:33:20 +00:00
Nikita Bobko
fa89b8b0f1
[FE 1.0] 2/2 Don't report a warning when new members are added to open expect actualization
...
^KT-62655 Fixed
2023-10-20 14:37:10 +00:00
Nikita Bobko
1d4ab50047
[FE 1.0] 1/2 Don't report a warning when new supertypes are added to open expect actualization
...
^KT-62655 Fixed
2023-10-20 14:37:10 +00:00
Nikita Bobko
12f932a63a
[FE 1.0] Report a more precise diagnostic when parameter modifiers (vararg) are changed in actualization
...
^KT-62747 Fixed
2023-10-20 14:37:10 +00:00
Nikita Bobko
0f82baf841
[FE 1.0] 2/2 Drop AllowDifferentMembersInActual from compiler and testData
...
The annotation was dropped in the previous commit
2023-10-20 14:37:09 +00:00
Pavel Kirpichenkov
770332152b
[LL] Don't register Java components for built-ins of non-JVM modules
...
This is the cause for the 'missing dependency supertype: Serializable'
issue: symbols from built-ins will have the additional Serializable
supertype provided by FirJvmDeserializationExtension that shouldn't
be used for non-JVM. In regular modules it is correctly not added by
the non-JVM sessions, leading to difference in supertypes and the error.
KTIJ-27449
2023-10-20 10:35:13 +00:00
Dmitrii Gridin
d689c1a38f
[FIR] FirJavaFacade: fix contract violation from annotations
...
`isJavaDeprecatedAnnotation` can't be used here because it triggers
the resolution of an annotation ClassId
^KT-62705 Fixed
2023-10-20 09:24:43 +00:00
Alexander Udalov
931c2ce47a
Reflection: fix calling suspend fun returning value class over primitive
...
#KT-47973 Fixed
2023-10-20 08:50:26 +00:00
Anastasia.Nekrasova
4f85cdbaed
[K2] Disappeared COMPONENT_FUNCTION_MISSING
...
^KT-59941
2023-10-19 21:18:01 +00:00
Ilya Chernikov
268d058bbb
Implement missing invoke resolution branch with context receivers
...
#KT-61937 fixed
Note: the current implementation only resolves for a single receiver
in each group. See KT-62712 and KT-62709 for the followup.
2023-10-19 19:39:31 +00:00
Evgeniy.Zhelenskiy
b89d8a65a1
[Reflection] Fix parsing JVM function descriptors
...
#KT-60708
2023-10-19 19:09:31 +00:00
Dmitrii Gridin
a60777b9a7
[FIR] move annotation recheck logic to ANNOTATIONS_ARGUMENTS_MAPPING phase
...
ARGUMENTS_OF_ANNOTATIONS will be dropped, so this check should be moved
This commit also drops class annotations resolution from implicit type
phase and provides the correct scope during argument mapping phase.
This code was effectively unreachable before
^KT-62679
2023-10-19 14:34:35 +00:00
Nikolay Lunyak
a0e9cc3206
[FIR] Fix new test data after merging a68a2409
2023-10-19 14:29:24 +00:00
Dmitriy Novozhilov
940567978d
[FIR2IR] Treat delegated functions as fake-overrides
...
Delegated callables in FIR are session-dependant (as fake-overrides),
so it's incorrect to use their FIR as a key for declaration storage.
Pair of original function and owner lookup tag should be used instead
^KT-62671 Fixed
2023-10-19 13:15:48 +00:00
Ivan Kylchik
70f195598e
[FIR2IR] Don't run interpreter's preprocessors on fir2ir stage
...
In IR interpreter we have "preprocessors". Preprocessor is a
transformer that changes IR expressions in a way that we can
interpret them at least partially.
We have two places where interpretation is happening:
1. Right after fir2ir where we evaluate only strictly necessary
expression for `const val` and annotations.
2. In lowering for every backend where we are doing some
constant folding.
Earlier, to avoid double work, we didn't launch preprocessors
in backend if we were using K2. But this approach breaks compilation
for MPP projects where one module is compiled with K1 into klib
and the overall project is compiled with K2. On the backend side,
we are mistakenly assuming that preprocessors were launched, but they
were not.
The solution is to run preprocessors only on the backend side. If we
think about it, interpretation on fir2ir doesn't require any
preprocessing because we are working only with expressions that are
correct and must be fully evaluated.
#KT-62126 Fixed
2023-10-19 12:29:32 +00:00
Pavel Kunyavskiy
da488f513f
[IR] Fix file modules after actualization
...
When files from different IrModules are merged in IrActualizer
their IrModule link was not updated. This led to assuming them
as different modules, and incorrect internal visibility handling.
^KT-62623
2023-10-19 10:16:45 +00:00
Vladimir Sukharev
9b9ddb760a
[FIR2IR] Coerce last operator in a loop to Unit
...
One of many fixes for https://youtrack.jetbrains.com/issue/KT-59781/K2-investigate-implicit-cast-generation-in-fir2ir-vs-psi2ir
Merge-request: KT-MR-12629
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-10-19 09:53:46 +00:00
Nikolay Lunyak
a68a2409d3
[FIR] Remove the applicability filtering when reporting diagnostics
...
In case we don't want to introduce any new
abstractions like "user relevance for
applicability", we can just remove the
filtering.
^KT-62541 Fixed
2023-10-19 09:27:45 +00:00