Dmitrii Gridin
ba947fbf04
[LL FIR] RawFirNonLocalDeclarationBuilder: drop redundant functions
...
They are obsolete as we dropped on-air resolution logic
2024-02-15 10:50:47 +00:00
Kirill Rakhman
33648e1f44
[FIR] Unwrap vararg array types for diagnostic rendering
...
#KT-65770 Fixed
2024-02-15 10:48:56 +00:00
Kirill Rakhman
eae72eac54
[FIR] Fix substitution of Java arrays enhanced for warning
...
... w.r.t the variance of their type arguments.
Because `Object[]` is represented as `Array<Any>..Array<out Any>?`,
when we substitute, we can't just take the upper bound because it
changes the variance of the type agument.
Instead, we construct a flexible type and use both bounds, like with
collections with flexible mutability.
#KT-65246 Fixed
2024-02-15 10:48:56 +00:00
Vladimir Sukharev
20f6b0cb0c
[K/N][Tests] Migrate test ir_providers_mismatch
...
^KT-61259
2024-02-15 10:13:56 +00:00
Alexander Udalov
88fbaed22e
Tests: minor, do not use target backend in kapt tests
...
These tests now only make sense for JVM_IR. Incidentally this fixes the
JVM illegal access warnings from generateTests, because the test
framework no longer tries to instantiate these tests (which leads to
`doOpenInternalPackagesIfRequired`) to determine the target backend.
The change in JvmEnvironmentConfigurator is needed so that JVM tests
without target backend would default to JVM IR instead of the old
backend.
Also rename files to match the class names.
2024-02-15 10:13:24 +00:00
Kirill Rakhman
879cdd5952
[FIR] Fix flattening of substitution overrides of intersection overrides for subsumed check
...
#KT-65555 Fixed
2024-02-15 08:43:06 +00:00
Roman Efremov
3994e3f63a
[FIR] Deprecate using typealias as callable qualifier in import
...
^KT-64350 Fixed
2024-02-15 08:37:02 +00:00
Kirill Rakhman
802366064d
[FIR] Expand annotation types in annotation serialization
...
#KT-65659 Fixed
2024-02-15 08:27:44 +00:00
Vladimir Sukharev
243d6aed50
[K/N][Tests] Add test for KT-65659
...
^KT-65659
2024-02-15 08:27:44 +00:00
Nataliya.Valtman
090407b7e3
Add compiler IRMeasurement to build reports
...
#KT-65091: Fixed
2024-02-15 07:51:51 +00:00
Anna Kozlova
b4b1c7cd69
[PSI] avoid loading KtFile class during parsing of chameleons
...
^KTIJ-28801 fixed
2024-02-15 07:17:26 +00:00
Ilya Kirillov
d925d3be76
[Analysis API] Fix Unexpected FirClassLikeSymbol null for class org.jetbrains.kotlin.fir.types.ConeClassLikeErrorLookupTag exception
...
on calling `asPsiType` on an unresolved type with type arguments
^KT-65550 fixed
2024-02-15 06:38:47 +00:00
Ilya Kirillov
50d526fe91
[Analysis API] Check all possible combinations of arguments in tests for KtType.asPsiType()
2024-02-15 06:38:47 +00:00
Vladimir Sukharev
bf0150108d
[K/N][Tests] Move filecheck and cinterop tests to /native/
...
^KT-61259
2024-02-14 23:36:34 +00:00
Dmitriy Dolovov
05cbe66ee0
[FIR][tests] Unify IntArrayAsVararg.kt test between K1 and K2
...
Rename `main` function to `test` to avoid running JVM-specific mangling
and having different IR signature dumps for K1 and K2.
^KT-65588
2024-02-14 23:00:04 +00:00
Alexander Udalov
41ef3da5ff
Tests: add regression test for KT-63448
2024-02-14 21:44:42 +00:00
Alexander Shabalin
72e30a3d26
[K/N][tests] :native:native.tests:test requires platform libs
2024-02-14 20:25:43 +00:00
Dmitrii Krasnov
70a887e3ba
[Gradle IT] Separated adding repositories block and dependencyManagement
...
In Gradle, there is a bug that leads to race condition,
when we use ivy repo in the settings file.
This bug was solved only in 8.1,
so we supported dependencyManagement in our IT only since 8.1.
For Gradle less 8.1 we just add the same repos to build script.
^KT-65708 Fixed
2024-02-14 20:02:25 +00:00
cristiangarcia
85399bc969
Fake service to limit tests concurrency
...
Required for KTI-1553
2024-02-14 18:35:43 +00:00
Dmitrii Gridin
46d16dfb6c
[LL FIR] PersistenceContextCollector: change designation path resolution order
...
We will process more specific declaration firstly to avoid contention.
As the next step of addbb713a5
^KT-65780
2024-02-14 17:53:31 +00:00
Dmitrii Gridin
78c394d4de
[LL FIR] FirElementBuilder: search file header elements without body resolution
...
^KT-65780
2024-02-14 17:53:31 +00:00
Dmitrii Gridin
04a2d6b616
[LL FIR] FirElementBuilder: make getFirForNonBodyElement more abstract
...
This is required for the next step
^KT-65780
2024-02-14 17:53:31 +00:00
Dmitrii Gridin
38a3010ac8
[LL FIR] FirElementBuilder: search file annotations without body resolution
...
^KT-65780
2024-02-14 17:53:31 +00:00
Dmitrii Gridin
cca58f5c2a
[LL FIR] FirElementBuilder: accept KtAnnotated instead of KtDeclaration as annotation owner
...
^KT-65780
2024-02-14 17:53:31 +00:00
Dmitrii Gridin
7796ef43db
[LL FIR] FileStructure: resolve FirFile to body phase as all other elements
...
This is the correct behavior as we have to resolve to body phase
to build CFG and run diagnostics collector correctly
^KT-65780 Fixed
2024-02-14 17:53:31 +00:00
Dmitrii Gridin
84b6d5d508
[LL FIR] add tests for getOrBuildFir for KtFileAnnotationList
...
^KT-65780
2024-02-14 17:53:31 +00:00
Dmitrii Gridin
5426cbc3df
[LL FIR] tests for this with annotations as implicit return type
...
^KT-61175
^KT-64215
2024-02-14 17:46:47 +00:00
Brian Norman
e3ddeff230
[FIR] Track local variable assigned types for smartcast stability
...
When a lambda captures a local variable without a contract, future
assignments can impact the smartcast stability for that variable within
the lambda. Because future assignments can appear in both resolved and
unresolved code, track each assignment as encountered. To determine if
a smartcast can be considered stable, check that all future assignments
are resolved and do not revert variable to a super type.
^KT-58191 Fixed
2024-02-14 17:44:53 +00:00
Dmitrii Gridin
e02c28c88a
[LL FIR] support lazy resolve of destructuring declaration entries
...
^KT-62840 Fixed
^KT-65727
2024-02-14 16:16:01 +00:00
Dmitrii Gridin
8c63e75f06
[LL FIR] update destructuringEntryScript testData
...
To reproduce getOrBuildFir for KtDestructuringDeclarationEntry
^KT-62840
2024-02-14 16:16:01 +00:00
Dmitrii Gridin
312feb3dca
[FIR] make script destructuring declaration entry initializer lazy expression
...
This change is required to properly support such declarations in lazy
resolution mode as we usually replaced initializers with lazy
expressions during the body calculation phase
^KT-62840
2024-02-14 16:16:01 +00:00
Dmitrii Gridin
c0f4f7fefd
[LL FIR] AbstractFirLazyBodiesCalculatorTest: add ability to suppress test
...
We have inconsistency in lazy body calculator, but only tests are
affected, because in the production we recreated bodies anyway
^KT-62840
2024-02-14 16:16:01 +00:00
Dmitrii Gridin
256d83b005
[LL FIR] support lazy resolve of <destruct> script declaration
...
But support for entries still is not implemented yet
^KT-62840
2024-02-14 16:16:01 +00:00
Dmitrii Gridin
792af849df
[LL FIR] add getOrBuildFir test on destructuring declaration annotation
...
It doesn't resolve the property as it is treated as a local one
^KT-62840
2024-02-14 16:16:01 +00:00
Dmitrii Gridin
9ca0bdcb80
[FIR] make script destructuring declaration initializer lazy expression
...
This change is required to properly support such declarations in lazy
resolution mode as we usually replaced initializers with lazy
expressions during the body calculation phase
^KT-62840
2024-02-14 16:16:01 +00:00
Dmitrii Gridin
898c8c002e
[LL FIR] add lazy body calculation tests for scripts
...
After KT-65344 we can effectively calculate lazy bodies in scripts,
so we can safely add the test
^KT-62840
2024-02-14 16:16:01 +00:00
cristiangarcia
f77c08a821
Fail fast, and with a descriptive error, if both configuration-cache and native are enabled
...
Required for KTI-1553
2024-02-14 14:45:15 +00:00
Vladimir Dolzhenko
95ea711659
Fix PsiLiteral#getReferences
...
#KTIJ-28769
Merge-request: KT-MR-14391
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com >
2024-02-14 13:39:50 +00:00
aleksandrina-streltsova
89681e0a47
[Analysis API] override equals in KtFirReceiverParameterSymbol
...
KTIJ-28786
2024-02-14 13:25:47 +00:00
Sergey.Shanshin
9a8ebd5c21
[KxSerialization] Cover all combinations of language and serialization features with tests for enums
...
Resolves https://github.com/Kotlin/kotlinx.serialization/issues/2324
Merge-request: KT-MR-13775
Merged-by: Sergei Shanshin <Sergey.Shanshin@jetbrains.com >
2024-02-14 13:15:01 +00:00
Kirill Rakhman
e39af4583e
[FIR] Report deprecation on synthetic property calls on super receivers
...
#KT-65438 Fixed
2024-02-14 13:13:01 +00:00
Kirill Rakhman
35e9170af1
[FIR] Rename hidden methods around HiddenEverywhereBesideSuperCalls and add documentation.
2024-02-14 13:13:01 +00:00
Kirill Rakhman
e8cbd8a1cd
[FIR] Report OVERRIDE_DEPRECATION for overrides of HIDDEN_IN_DECLARING_CLASS_ONLY
...
#KT-65438 Fixed
2024-02-14 13:13:01 +00:00
Kirill Rakhman
24367e0ad8
[FIR] Implement isHiddenEverywhereBesideSuperCalls logic for constructors
...
#KT-61448 Fixed
2024-02-14 13:13:01 +00:00
Kirill Rakhman
2f49272c42
[FIR] Create fake hidden versions of List.getFirst/getLast in JDK < 21
...
... so that overrides are marked as deprecated regardless of the JDK.
#KT-65440 Fixed
2024-02-14 13:13:01 +00:00
Kirill Rakhman
c6b2675089
[FIR] Implement deprecation for calls to overrides of hidden
...
#KT-65438
2024-02-14 13:13:00 +00:00
Kirill Rakhman
e16f80c578
[FIR] Prevent duplicate full stop in DEPRECATION messages
2024-02-14 13:13:00 +00:00
Kirill Rakhman
fc6d25e50f
[FIR] By default, only hide members from mapped scope but not overrides
...
This affects methods like List.getFirst/getLast where it was decided
to keep them hidden but to make them visible on overrides like
ArrayList or LinkedList.
The goal is to prevent a breaking change since some implementations
like LinkedList had this method before JDK 21.
#KT-65438
2024-02-14 13:13:00 +00:00
Vladimir Sukharev
fbe8db4b45
[K/N][Tests] Migrate test override_konan_properties0 and add testDriverVersion
...
^KT-61259
2024-02-14 12:16:23 +00:00
Vladimir Sukharev
9ef051dbc5
[K/N][Tests] Migrate test override_konan_properties0
...
^KT-61259
2024-02-14 12:16:22 +00:00