Commit Graph

174 Commits

Author SHA1 Message Date
Yan Zhulanow f6f667c387 [LL API] Adjust services required by LLFirBuiltinsSessionFactory
As 'initialiseVirtualFileFinderServices()' that is run during
test initialization collects transitive dependencies, all of them
must be ready. However, 'KtNotUnderContentRootModuleForTest' has a
built-in dependency provided by 'LLFirBuiltinsSessionFactory'.
2023-01-25 08:04:40 +00:00
Justin Paupore cd61f545a8 [AA] Clean up typos in KtTypeRenderer. 2023-01-24 14:39:55 +01:00
Justin Paupore eccbc66581 [AA] Add implementation for annotationApplicableTargets.
Adds implementation and tests for the new
KtClassOrObjectSymbol.annotationApplicableTargets property on
KtSymbolInfoProvider. This implementation delegates to the canonical
implementation in AnnotationChecker for FE1.0, and to the implementation
in FirAnnotationHelpers for FIR.

This change also includes direct tests for annotationApplicableTargets,
and a fix for FirClassLikeSymbol.getAllowedAnnotationTargets in
FirAnnotationHelpers.
2023-01-24 14:39:55 +01:00
Dmitrii Gridin 09a77d261d [AA] KtTypeInfoProvider: introduce fullyExpandedType extension
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:03 +00:00
Anna Kozlova 6f9cfe1943 [AA] don't treat broken code as function type parameter
inspired by KTIJ-23940
2023-01-17 11:50:20 +00:00
Vladimir Dolzhenko ca31307941 [AA] Add expectForActual
#KT-54864

Merge-request: KT-MR-8222
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2023-01-13 21:36:04 +00:00
Dmitriy Novozhilov a3b9f15ecc [AA LC] Create proper Psi types for types with errors inside 2023-01-12 17:45:08 +00:00
Dmitriy Novozhilov 3a536bb32f [AA LC] Approximate anonymous type to single supertype if possible
^KT-55780 Fixed
^KT-55778 Fixed
2023-01-12 17:45:07 +00:00
Justin Paupore 686551d1eb [AA] Add support for printing meta-annotations in annotation tests.
This functionality will be used in follow-on commits.
2023-01-12 19:48:21 +09:00
aleksandrina-streltsova 3a6e3290aa [FIR] KTIJ-24156: Add test data 2023-01-10 20:15:28 +00:00
Ilya Kirillov 61d8b91c89 [Analysis API] add tests for checking KtType internals 2023-01-10 12:54:17 +00:00
Dmitrii Gridin 5a74fec3ac [AA] KtAnnotated: split hasAnnotation to two extensions 2023-01-06 21:09:43 +00:00
Dmitrii Gridin 4626b19fce [AA] KtAnnotated: introduce more flexible search API 2023-01-06 21:09:40 +00:00
Dmitrii Gridin 13917887e0 [AA] KtSymbolPointer: introduce pointsToTheSameSymbolAs method
^KT-55191
2023-01-02 20:00:49 +00:00
Dmitrii Gridin e27ffada26 [AA] KtSymbol: add context receiver to 'createPointer'
^KT-54051
2022-11-29 13:33:46 +00:00
Dmitrii Gridin 55ca2d608b [AA] AbstractSymbolTest: add check for parameters
^KT-54826
2022-11-24 18:32:44 +00:00
Dmitrii Gridin 48e2e5cc87 [AA] AbstractSymbolTest: add type parameters check
^KT-54826
2022-11-24 18:32:43 +00:00
Dmitrii Gridin 771823c9e7 [AA] AbstractSymbolTest: improve implicit checks
^KT-54826
2022-11-24 18:32:42 +00:00
Dmitrii Gridin edd60cd204 [AA] improve symbol pointers for property accessors
Fe10:
* supported default setter
* support default getter
* support parameter from default setter

Fir:
* support java synthetic properties
* support parameter from default setter

^KT-54051
2022-11-24 18:32:41 +00:00
Jinseong Jeon c79d65536b Gracefully handle erroneous super type during local type approximation
^KTIJ-23528 Fixed
2022-11-22 20:16:40 +01:00
Ilya Kirillov f775778efa [Analysis API FIR] fix containing declaration for value parameter
now it should also work for non-source declarations
2022-11-22 18:25:30 +01:00
Dmitrii Gridin d0cc88ffe0 [AA] KtCallableSymbol: introduce receiverType extension
^KT-54417
2022-11-17 09:50:12 +00:00
Dmitrii Gridin 1ebfbc0ee9 [AA] KtCallableSymbol: rename receiver to receiverParameter
^KT-54417
2022-11-17 09:50:12 +00:00
Dmitrii Gridin 2741052db3 [AA] integrate KtReceiverParameterSymbol to KtCallableSymbol
^KT-54417
2022-11-17 09:50:10 +00:00
Yan Zhulanow 4d41ac09df [Analysis API] Treat inapplicable declarations safely (KTIJ-23458)
Make 'getClassOrObjectSymbol()' and 'getNamedClassOrObjectSymbol()'
return 'null' for inapplicable PSI declarations.
2022-11-11 11:28:38 +00:00
Ilya Kirillov 2378437b30 [Analysis API FIR] do not create resolved KtTypes for unresolved ones 2022-11-11 12:00:00 +01:00
Ilya Kirillov b47675916f [Analysis API] remove old renderer code 2022-11-11 12:00:00 +01:00
Ilya Kirillov d1eb7c51f1 [Analysis API] rework renderer
^KTIJ-23268 fixed
2022-11-11 11:59:58 +01:00
Dmitrii Gridin 7d1ac0ac97 [AA] AbstractSymbolTest: fix race
^KT-54311
2022-11-10 06:39:17 +00:00
Dmitrii Gridin 4bd604f2ed [AA] check symbol pointer restoring without psi anchor
^KT-54311
2022-11-10 06:39:14 +00:00
Jinseong Jeon c9a2e10dd7 AA: merge single/multi modules tests for PsiTypeProvider
...because single-module test is also multi-module test
2022-11-02 17:38:16 +01:00
Jinseong Jeon d98081dce2 AA: introduce MPP tests for PsiTypeProvider 2022-11-02 17:38:16 +01:00
Jinseong Jeon dc7506c40a AA: utilize logic in PsiTypeProvider test
...to reuse them in upcoming multi-module tests
2022-11-02 17:38:15 +01:00
Ilya Kirillov e2416f48fe [Analysis API] add tests for containing declaration for delegated member scope 2022-10-26 19:19:04 +00:00
Ilya Kirillov 4bb32f4634 [Analysis API] render extra debug information for nested symbols if renders for outers 2022-10-26 19:19:02 +00:00
Ilya Kirillov 3bc19fa2c7 [Analysis API] change return type of KtScope.getAllSymbols to KtDeclaration symbol as it always returns callable or classifier 2022-10-26 19:19:02 +00:00
Ilya Kirillov 97df0a0902 [Analysis API] rework containing declaration provider
now it should work for non-source declarations
2022-10-26 19:19:00 +00:00
Dmitrii Gridin 6bf1cefba6 [AA] do not render redundant declarations for AbstractSymbolByPsiTest
^KT-54311
2022-10-17 14:59:52 +00:00
Dmitrii Gridin a38e1747c3 [AA] split some SymbolByPsi tests on SingleSymbolByPsi to avoid redundant declarations
^KT-54311
2022-10-17 14:59:52 +00:00
Dmitrii Gridin 804a92546c [AA] AbstractSingleSymbolByPsi: search elements by caret instead of expression
^KT-54311
2022-10-17 14:59:51 +00:00
Dmitrii Gridin ba7d340090 [AA] more tests on receiver annotations
^KT-54311
^KT-54385
^KT-54417
2022-10-17 14:59:50 +00:00
Dmitrii Gridin 119f6858cd [AA] AbstractSymbolTest: add assertion on redundant directive
^KT-54311
2022-10-17 14:59:45 +00:00
Ilya Kirillov fceb3425c8 [Analysis API FIR] fix invalid usages of CachedValue
it should not cache map as values are stored on soft references
2022-10-05 15:53:54 +00:00
Ilya Kirillov 4de311f671 [Analysis API FIR] remove unused CachingKtAnalysisSessionProvider.getFirResolveSession(KtSymbol) 2022-10-05 15:53:53 +00:00
Ilya Kirillov b68532a316 [Analysis API FIR] fix memory leaks via KtAnalysisSessionCache keys 2022-10-05 15:53:53 +00:00
Kristoffer Andersen f765457e51 [K2] isUsedAsExpression analysis 2022-10-05 15:06:52 +00:00
Ilya Kirillov 49f2f85927 [Low Level FIR] fix exception when creating symbol by invalid code 2022-10-04 12:56:07 +00:00
Ilya Kirillov ab3f916f3f [Analysis API FIR] fix call resolution of non-resolvable elements 2022-10-03 16:02:23 +02:00
Jinseong Jeon df95602e06 AA: populate index for built-ins 2022-09-17 16:43:10 +02:00
Dmitriy Novozhilov 7ef81c27df [AA] Make KotlinReferenceProvidersService and KotlinReferenceProviderContributor a project services
There is no need to have those services on application level
2022-09-15 17:27:20 +03:00