Ilya Chernikov
70d2fcd9c4
K2 Scripting: deprecate top level script inner classes
...
no LT support yet
2023-07-05 19:46:03 +00:00
Ilya Chernikov
7484ccb9ee
K2 Scripting: allow script top level inline functions
2023-07-05 19:46:03 +00:00
Ilya Chernikov
86b3e65d19
K2 Scripting: enable script processing in diagnostics collector
...
and add scripts to containing decls in checker context te be able to
check for containing script in checkers
2023-07-05 19:46:03 +00:00
Ilya Chernikov
f79f715590
Fir2Ir: remove error reporting on no receiver
...
this error is not valid for scripts, where some receivers are set
later in the lowering, and it looks like in other cases this problem
will be detected later in lowering or codegen anyway.
2023-07-05 19:46:03 +00:00
Ilya Chernikov
7866c63e49
Fir2Ir: add fake overrides binding for script top level classes
2023-07-05 19:46:03 +00:00
Ilya Chernikov
9adf24950a
Fir2Ir scripts: fix declarations registration and processing
2023-07-05 19:46:03 +00:00
Ilya Chernikov
5824b9c59c
K2 Scripting: add Fir script codegen tests
...
27 failing tests are muted
2023-07-05 19:46:03 +00:00
Dmitrii Gridin
83d0dbe436
[LL FIR] FileStructure: reanalyze declarations without name as well
...
^KT-60132 Fixed
^KT-59687
2023-07-05 20:29:01 +02:00
Dmitrii Gridin
9e88da2e66
[LL FIR] FileStructure: add tests for re-analyzable elements without names
...
^KT-60132
^KT-59687
2023-07-05 20:29:01 +02:00
Dmitrii Gridin
e354b2a900
[LL FIR] rewrote in-block modifications logic
...
Now we will invalidate bodies for FIR declarations
immediately after in-block modifications in these declarations
We assume that such in-block modifications can happen
only under write action,
so it should be safe to make changes for FirFile
^KT-59687 Fixed
^KT-59199 Fixed
^KTIJ-26066 Fixed
2023-07-05 20:29:00 +02:00
Dmitrii Gridin
a50efd7aa2
[LL FIR] treat changes inside contract description as OOBM
...
Because contracts affects resolution
^KT-59687
^KTIJ-26085 Fixed
^KTIJ-26066
2023-07-05 20:28:28 +02:00
Dmitrii Gridin
99e2a14b9c
[LL FIR] do not reanalyze non-top level properties with initializer
...
Treat changes inside non-top level property initializer as OOB
It is OOB because CFG for a class depends on a property initializer,
so we must rebuild CFG for the class
Also, this commit makes the API more understandable
^KT-59687
2023-07-05 20:28:28 +02:00
Dmitrii Gridin
8137bee09c
[LL FIR] drop empty files
2023-07-05 20:28:28 +02:00
Pavel Punegov
7cb0875bd8
[K/N][test] Add ExperimentalNativeApi opt-in in the samples
2023-07-05 18:20:35 +00:00
Ivan Kochurkin
7b3f1c73ca
[FIR] Add @Supress("unused") to generated files
2023-07-05 17:53:52 +00:00
Ivan Kochurkin
ee44bddaf9
[FIR] Add @Supress("unused") to debug and plugin-related declarations
2023-07-05 17:53:52 +00:00
Ivan Kochurkin
43b76f3c24
[FIR] Remove unused declarations
2023-07-05 17:53:51 +00:00
Yan Zhulanow
6156609617
[PSI] Increment modification stamp on adding imports to 'KtCodeFragment'
...
LL API incremental analysis depends on modification stamps for files and
declarations. Adding an import directive would modify a modification
stamp of an ordinary KtFile. The same should apply to a KtCodeFragment.
2023-07-05 16:55:38 +00:00
Dmitriy Novozhilov
1ca1616528
[FIR] Check for extension and context receiver in isMethodOfAny utility
2023-07-05 14:57:55 +00:00
Dmitriy Novozhilov
210ad770aa
[FIR] Remove duplicated logic for isMethodOfAny utility
2023-07-05 14:57:55 +00:00
Dmitriy Novozhilov
4da51ee997
[FIR2IR] Use FIR symbol instead of IR during conversion of function calls
2023-07-05 14:57:55 +00:00
Dmitriy Novozhilov
8083a50017
[FIR2IR] Use FIR symbol instead of IR during conversion of receivers for calls
2023-07-05 14:57:55 +00:00
Dmitriy Novozhilov
e66fac3d5f
[FIR] Don't set dispatch receiver type for local functions
2023-07-05 14:57:55 +00:00
Dmitriy Novozhilov
6bb7fc05df
[IR] Split implementation of DataClassMembersGenerator to IR based and descriptor based
2023-07-05 14:57:55 +00:00
Egor Kulikov
27f4b53570
[FIR] Do not expect builtin imports to be always resolved
...
Merge-request: KT-MR-10886
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2023-07-05 14:02:50 +00:00
Mikhail Glukhikh
6bed02fed3
K2: fix an exception during function resolve #KT-59649 Fixed
2023-07-05 13:52:45 +00:00
Ivan Kylchik
d557bcaba4
[IR] Forbid unconditional interpretation of IrGetObjectValue
...
Earlier we always allowed to interpret `IrGetObjectValue` because
this value is used in const val getter. But now we do a special
check for such getter avoiding visit of `IrGetObjectValue` node.
#KT-59775 Fixed
2023-07-05 13:33:41 +00:00
Kirill Rakhman
04f16d75d2
[K2 MPP] Fix hasStableParameterNames check for fake overrides
...
This fixes a false positive error regarding different
parameter names in expect actual matching with fake overrides.
#KT-59737 Fixed
2023-07-05 13:30:01 +00:00
aleksandrina-streltsova
116de97f54
[AA] Add synthetic properties scopes to scope context for position
2023-07-05 12:36:54 +00:00
Timofey Solonin
5d8e23e971
[MPP] Don't enable commonization in subprojects of a project where
...
CocoaPods plugin was applied
^KT-58712
2023-07-05 11:21:47 +00:00
Vladimir Dolzhenko
3c8c20f8d2
Do not do unnecessary writeBooleanAttribute
...
Merge-request: KT-MR-10945
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com >
2023-07-05 09:27:04 +00:00
Kirill Rakhman
988dbfc5c8
[FIR] Extract common helper for checking of (expect) default value
2023-07-05 08:51:01 +00:00
Kirill Rakhman
1d3a127f52
[FIR] Simplify getSingleExpectForActualOrNull
...
When compatibleOnly == false, the logic was equivalent to returning
singleOrNull.
The only call-site with compatibleOnly = true was FirElementSerializer,
but after the fix for KT-59613, the map will never contain multiple
entries when one of the entries is compatible.
Assuming that we only run serialization on green code, the map will
either contain one compatible entry or no entries which makes the
additional check redundant.
2023-07-05 08:51:01 +00:00
Kirill Rakhman
b68962018c
[FIR] Remove incompatible from expect actual matching if compatible exists
...
This fixes an issue with checking for default values in call resolution
(see FirDefaultParametersResolver) where it is expected that the map
only contains a single compatible entry.
#KT-59613 Fixed
2023-07-05 08:51:01 +00:00
Dmitriy Novozhilov
fcff1c2ddc
[FIR] Remove meaningless check from FirDoubleColonExpressionResolver
...
In FIR `FirFunctionCall` is created only for real function calls
2023-07-05 08:25:43 +00:00
Dmitriy Novozhilov
e1e305bf6d
[FIR] Set proper source for synthetic function calls
2023-07-05 08:25:43 +00:00
Dmitriy Novozhilov
10054c584c
[FIR] Attach YT tickets to meaningful TODOs in :fir:resolve module
2023-07-05 08:25:43 +00:00
Dmitriy Novozhilov
22b2774ef7
[FIR] Use proper scope lookup for classifiers
2023-07-05 08:25:42 +00:00
Dmitriy Novozhilov
4dafc3b6e6
[FIR] Assert that CFG for anonymous objects is created only once
2023-07-05 08:25:42 +00:00
Dmitriy Novozhilov
d3a098e7ef
[FIR] Remove redundant TODOs from FirSamResolver
2023-07-05 08:25:42 +00:00
Dmitriy Novozhilov
213b39f213
[FIR] Get rid of obsolete TODOs in :fir:resolve module
2023-07-05 08:25:42 +00:00
Dmitriy Novozhilov
e6fbcb5567
[FIR] Simplify utility for extracting constructor from FirAnnotation
2023-07-05 08:25:42 +00:00
Dmitriy Novozhilov
02c08a4673
[FIR] Properly implement FirFunctionCall.hasExplicitValueArguments
2023-07-05 08:25:42 +00:00
Dmitrii Krasnov
2f63c6e1bd
Migrated CommonizerHierarchicalIT to new test dsl (junit 5 and gradle test kit)
2023-07-05 08:06:37 +00:00
Alexander Korepanov
4695dca056
[JS IR] Keep box and unbox intrinsics in call args after decomposing
...
^KT-59717 Fixed
2023-07-05 07:33:03 +00:00
Ilya Goncharov
148d8c9246
[Gradle, JS] Migrate JS cli tests to ir backend
2023-07-05 07:10:06 +00:00
Dmitriy Novozhilov
38533977f0
[Test] Add test for KT-35314
2023-07-05 06:56:15 +00:00
Dmitriy Novozhilov
5d6328a706
[Test] Add test for KT-53460
2023-07-05 06:56:15 +00:00
Dmitriy Novozhilov
31d046e8cd
[Test] Add test for KT-40851
2023-07-05 06:56:15 +00:00
Dmitriy Novozhilov
eb041d5d6d
[Test] Add test for KT-42995
2023-07-05 06:56:14 +00:00