Mikhail Glukhikh
0c287c9945
K2: reproduce KT-61933
2023-09-20 15:42:03 +00:00
Roman Efremov
ad4d1a5ba8
[IR] Support ACTUAL_ANNOTATION_CONFLICTING_DEFAULT_ARGUMENT_VALUE in K2
...
It's implemented as IR checker because in K2 constant expressions are
evaluated on backend. FIR diagnostic removed because isn't needed.
"annotationViaActualTypeAlias" test has no `// FIR_IDENTICAL` because
diagnostic reported on entire typealias declaration instead of its name.
This is because in IR+LightTree we have only offsets, so can't navigate
to typealias name element.
^KT-59940 Fixed
2023-09-20 15:40:37 +00:00
Roman Efremov
ce666182a2
[IR] Refactor: extract util methods from IrExpectActualAnnotationMatchingChecker
...
They will be re-used in new checker in subsequent commit.
^KT-59940
2023-09-20 15:40:37 +00:00
Roman Efremov
d4b8f73e04
[IR] Refactor: create new class for all IR expect-actual checkers
...
...to not write call of each checker inside IrActualizer.actualize.
This is needed because new IR checker will be addded in subsequent
commits.
^KT-59940
2023-09-20 15:40:37 +00:00
Sergej Jaskiewicz
88c308dfd3
[FIR generator] Don't print extra space in the where clause
2023-09-20 15:39:40 +00:00
Dmitrii Gridin
1d0785e246
[LL FIR] do not try to apply in-block modifications for unresolved bodies
...
In-block modifications are applicable only for FIR declarations with
fully resolved bodies. It can happen only during implicit type and body
phases. The implicit type phase probably is not applicable for our
particular case, but we will play safe because properties have a
complicated resolution logic, so it is hard to be sure that only body
phase will be enough.
Changes inside contracts are treated as out-of-block, so we can avoid
marker from this phase. Also, all mentioned calls inside bodies resolve
the corresponding declarations to the contract phase, so we will save a
lot with this optimization.
Q: Why in-block modification can be heavy?
A: In most cases this invalidation is pretty cheap because we have all
required information inside caches. But it is possible that we can
receive an in-block modification event for PSI without a corresponding
FIR element, or it is not yet fully resolved. In this case, for example,
we will do such redundant works as a raw FIR building or KtModule search
^KT-61842 Fixed
2023-09-20 15:36:02 +00:00
Dmitrii Gridin
f7fe33bd98
[LL FIR] move in-block analysis declarations closer to service
...
^KT-61842
2023-09-20 16:04:03 +02:00
Dmitry Savvinov
0db4f464bb
[gradle, kmp] Minor: add more info to deprecation message
...
Buildscripts that used `ios`-shortcut certainly used
`val iosMain by getting` as well, which will lead to Gradle exception
after migration. Mention in the diagnostic message that one should
replace `by getting` with static accessors
^KT-60734
2023-09-20 13:33:06 +00:00
Dmitriy Novozhilov
e31ee1fa57
[FIR2IR] Get rid of builtin classes scope precaching
...
Previously it was required to generate fake-overrides for builtin classes
beforehead, but during fix of KT-60924 it is no longer required
^KT-60924
2023-09-20 13:27:09 +00:00
Dmitriy Novozhilov
4e08cafc78
[FIR2IR] Get rid of IrSymbol.owner usages in Fir2IrLazyClass
...
^KT-60924
2023-09-20 13:27:09 +00:00
Dmitriy Novozhilov
5dbc0f12d1
[FIR2IR] Rename getIrEnumEntry to getOrCreateIrEnumEntry
...
This is needed for sake of naming consistency.
2023-09-20 13:27:09 +00:00
Dmitriy Novozhilov
3a9567ad45
[FIR2IR] Get rid of IrSymbol.owner usages in generation of delegated bodies in DelegatedMemberGenerator
...
^KT-60924
2023-09-20 13:27:09 +00:00
Dmitriy Novozhilov
4164c0f7ef
[FIR2IR] Get rid of all usages of IrSymbol.owner from Fir2IrLazySimpleFunction
...
^KT-60924
2023-09-20 13:27:09 +00:00
Dmitriy Novozhilov
97005e5f78
[FIR2IR] Get rid of all usages of IrSymbol.owner from Fir2IrLazyPropertyAccessor
...
^KT-60924
2023-09-20 13:27:09 +00:00
Dmitriy Novozhilov
5b2fe7290b
[FIR2IR] Move opt-ins to IrSymbolInternals closer to actual usages of symbol.owner
...
^KT-60924
2023-09-20 13:27:09 +00:00
Dmitriy Novozhilov
3778a69bf6
[FIR2IR] Replace getIrFieldSymbol with getOrCreateIrField in Fir2IrDeclarationStorage
...
Effectively, `getIrFieldSymbol` always created `IrField` if it was needed
and returned its symbol. So to avoid potentially unsafe access of
`IrFieldSymbol.owner` it's more convenient to return directly `IrField`
^KT-60924
2023-09-20 13:27:09 +00:00
Dmitriy Novozhilov
e7b95d1288
[FIR2IR] Replace getIrClassSymbol with getOrCreateIrClass in Fir2IrClassifierStorage
...
Effectively, `getIrClassSymbol` always created `IrClass` if it was needed
and returned its symbol. So to avoid potentially unsafe access of
`IrClassSymbol.owner` it's more convenient to return directly `IrClass`
^KT-60924
2023-09-20 13:27:08 +00:00
Ivan Kochurkin
063835488f
Revert "[FIR] Fix missing RETURN_TYPE_MISMATCH for labeled return statements"
...
This reverts commit 8e72f60996
Since some intellij tests are failing
2023-09-20 12:29:41 +02:00
Vladimir Sukharev
e9d4de658d
[FIR2IR] Don't emit empty body of while/do_while loop
...
Merge-request: KT-MR-12283
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-09-20 10:06:00 +00:00
Kirill Rakhman
5b4409e34c
[FIR] Store abbreviated type in deserialized declarations as attribute
...
#KT-58542 Fixed
2023-09-20 09:31:29 +00:00
Ivan Kochurkin
8e72f60996
[FIR] Fix missing RETURN_TYPE_MISMATCH for labeled return statements
...
in lambda functions, ^KT-59907 Fixed
2023-09-20 09:06:37 +00:00
Kirill Rakhman
2e4d486131
[FIR] Use enhanced scope to guess array type in annotation loading
...
Otherwise, we return null for any java annotation because the
unenhanced scope doesn't contain any properties.
#KT-61856 Fixed
2023-09-20 08:02:37 +00:00
Dmitriy Dolovov
c4da53475e
[JS][tests] Drop obsolete EXPECT_ACTUAL_LINKER test directive
...
This directive was earlier used in KMP tests that were rewritten
and do not require this directive anymore.
^KT-61136
2023-09-20 07:54:36 +00:00
Dmitriy Dolovov
70d12b271d
[Native][tests] Drop obsolete EXPECT_ACTUAL_LINKER test directive
...
This directive was earlier used in KMP tests that were rewritten
and do not require this directive anymore.
^KT-61136
2023-09-20 07:54:36 +00:00
Dmitriy Dolovov
249106b23f
[KLIB] Drop obsolete tests on serialization of expect IR declarations
...
These tests are muted for all KLIB-oriented platforms for a long time
and are no more relevant since the removal of ExpectActualTable.
^KT-61136
2023-09-20 07:54:36 +00:00
Ilya Kirillov
b25185530f
[Analysis API Standalone] use compiler FirSymbolProvider for standalone mode
...
^KT-61371 fixed
2023-09-20 07:47:59 +00:00
Ilya Kirillov
d377d87c77
[LL FIR] refactoring, add service accessor for LLFirLibrarySymbolProviderFactory
...
^KT-61371
2023-09-20 07:47:59 +00:00
Ilya Kirillov
9c50308954
[LL FIR] refactoring, rename LLFirLibrarySymbolProviderFactory.createJvmFirDeserializedSymbolProviders -> createJvmLibrarySymbolProvider
...
to match the behavior
^KT-61371
2023-09-20 07:47:59 +00:00
Ilya Kirillov
cce8bc6f83
[LL FIR] refactoring, use Project from project session constructor for implementations of LLFirLibrarySymbolProviderFactory
...
^KT-61371
2023-09-20 07:47:59 +00:00
Ilya Kirillov
2422fc6df3
[LL FIR] refactoring, extract LLFirLibrarySymbolProviderFactory implementation to the standalone module
...
^KT-61371
2023-09-20 07:47:59 +00:00
Ilya Kirillov
575c7ea0d9
[LL FIR] refactoring, rename JvmFirDeserializedSymbolProviderFactory
...
so it can be used not only for JVM
^KT-61371
2023-09-20 07:47:59 +00:00
Ilya Gorbunov
93b107000a
[stdlib-mpp] Remove stdlib projects no longer included in build
2023-09-20 01:07:59 +00:00
Ilya Gorbunov
222f996d45
[stdlib-mpp] Cleanup kotlin.stdlib.mpp build flag (always true)
2023-09-20 01:07:59 +00:00
Sergej Jaskiewicz
00fa09dbf3
[IR generator] Use ImplementationKind instead of Element.Kind
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-19 22:19:37 +00:00
Sergej Jaskiewicz
af5a93f5ff
[IR generator] Use TypeKind from the common module, share it with FIR
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-19 22:19:37 +00:00
Sergej Jaskiewicz
0dd01279da
[FIR generator] Move Implementation.Kind to common module
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-19 22:19:37 +00:00
Sergej Jaskiewicz
e62343427d
[FIR generator] Move Field and FieldContainer to common module
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-19 22:19:37 +00:00
Sergej Jaskiewicz
982b9221b4
[FIR generator] Move ArbitrarilyImportable class to common module
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-19 22:19:37 +00:00
Sergej Jaskiewicz
7a6bffaabb
[FIR generator] Move Importable interface to common module
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-09-19 22:19:37 +00:00
Nikolay Lunyak
ec9cb8beb6
[FIR] Rename JvmNames -> JvmStandardClassIds
...
This is more consistent with the code of
the common compiler checkers.
It would be nice to refactor the contents
of this object further, but it's out
of scope of the current branch.
^KT-54596
2023-09-19 22:14:09 +00:00
Nikolay Lunyak
986f1624ec
[FIR] Remove jvm-specific annotations from common compiler code
...
^KT-54596 Fixed
2023-09-19 22:14:09 +00:00
Ilmir Usmanov
f7a2da8f82
Minor. Add regression test for KT-41997
...
#KT-41997 Fixed
2023-09-19 20:11:57 +00:00
Artem Kobzar
94eefba824
[K/Wasm] Optimize range checks
2023-09-19 17:04:41 +00:00
Ilya Goncharov
24e8c9c90d
[Gradle, Wasm] Add nodeJs setup task dependency to wasi test task
...
^KT-61971 fixed
2023-09-19 16:54:42 +00:00
Mikhail Glukhikh
46093c686e
KotlinVersionsTest: temporary convert to language update state
...
#KT-59171 Fixed
2023-09-19 15:46:31 +00:00
Mikhail Glukhikh
a40951d65d
Reformat KotlinVersionsTest
2023-09-19 15:46:31 +00:00
Mikhail Glukhikh
d1e4e6cc2e
LV 2.0: drop wrong comment on testRawTypes (KT-62043)
2023-09-19 15:46:31 +00:00
Mikhail Glukhikh
02961b7712
LV 2.0: fix Native Gradle integration test data
2023-09-19 15:46:31 +00:00
Anton Lakotka
232bbda076
[Gradle] Disable Kapt4.testKt18799 for K2
...
Until KT-61845 is fixed
^KT-61845
^KT-61106 Verification Pending
2023-09-19 15:46:30 +00:00
Anton Lakotka
79778877c2
[Gradle] Add missing kotlin-compiler-args plugin for test
...
This will ensure that language version is set correctly.
^KT-61106 Verification Pending
2023-09-19 15:46:30 +00:00