Commit Graph

661 Commits

Author SHA1 Message Date
Ilya Kirillov 092550aaee [Symbol LC] fix invalid caching for FirLightClassBase
Previously, value created by FirLightClassesLazyCreator was never recalculated based on dependencies changes
2022-03-03 20:12:56 +03:00
Mikhail Glukhikh ebed224f82 FE 1.0: use TYPE_VARIANCE_CONFLICT deprecation factory 2022-03-03 12:57:04 +00:00
Mikhail Glukhikh 7781413a93 FE 1.0: report TYPE_VARIANCE_CONFLICT also on qualifier type arguments
#KT-51439 Fixed
2022-03-03 12:57:04 +00:00
Jinseong Jeon 870cdfd226 AA: add an API to configure proj env w/o explicit KtFiles
We can retrieve source files from compiler configuration.
Then, we can search for corresponding KtFiles for them.
2022-03-02 21:11:54 +01:00
Jinseong Jeon 47b0e66ca1 AA: remove unnecessary source path retrieval/cache
Instead, use source module's contentScope
2022-03-02 21:11:54 +01:00
Jinseong Jeon a68fd25982 AA: relax the assertion about referenced ClassId and qualified access
If an import alias is involved, they could be not identical.
Since an import alias ends with a simple identifer, we can simply drop
the first segment of qualified access and try the assertion again.
2022-03-02 20:30:31 +01:00
Dmitriy Novozhilov 18fc2802e5 [FIR] Make FirTypeParameter.containingDeclarationSymbol not null
Also fix initializing this property in all places
2022-02-28 11:42:34 +03:00
Roman Golyshev 8bcdc70adc FIR IDE: Add IDE tests for sample compiler plugin 2022-02-25 23:08:26 +03:00
Roman Golyshev fed08aaff5 FIR IDE: Consider COMPANION_GENERATION phase in lazy resolve 2022-02-25 23:08:26 +03:00
Roman Golyshev 6e649dd29c FIR IDE: Add a way to use test compiler plugin in FIR IDE tests
Compiler plugins can be enabled
by WITH_FIR_TEST_COMPILER_PLUGIN directive
2022-02-25 23:08:26 +03:00
Roman Golyshev 1a77643ad0 FIR IDE: Add static implementation of KotlinAnnotationsResolver 2022-02-25 23:08:26 +03:00
Roman Golyshev 765af5f18a FIR IDE: Register plugins-related session components in IDE session
Move registering CLI-specific plugin-related components to
`registerCliCompilerOnlyComponents`
2022-02-25 23:08:25 +03:00
Roman Golyshev 8d9d46dae3 FIR IDE: Lift extensions registration higher in session creation process
We want to do that before creating symbol providers
2022-02-25 23:08:25 +03:00
Roman Golyshev b1b99e1673 FIR IDE: Add the simplest support for PLUGIN KtDeclarationOrigin 2022-02-25 23:08:25 +03:00
Roman Golyshev 6d6a3fbe21 FIR IDE: Consider generated names in KtFirPackageScope
If scope doesn't return generated names from `getPossibleCallableNames`,
it's impossible to query them from the scope, since you have to know the
name of callable/classifier to query it
2022-02-25 23:08:25 +03:00
Roman Golyshev 13cc0ddf97 FIR: Implement FirIdePredicateBasedProvider 2022-02-25 23:08:25 +03:00
Roman Golyshev 08b6353431 FIR: Add IDE implementation for FirRegisteredPluginAnnotations
It works on `KotlinAnnotationsResolver`, which means that it uses
PSI indices to search for the annotations
2022-02-25 23:08:25 +03:00
Roman Golyshev 76707afc90 FIR: Add KotlinAnnotationsResolver service 2022-02-25 23:08:25 +03:00
Ilya Kirillov 4a5aee688e FIR LC: fix invalid type param upper bound 2022-02-25 14:06:05 +01:00
Mikhail Glukhikh 53d6ac24e5 Switch kotlin version to 1.7
* Change 1.6 to 1.7 constants
* Fix SAFE_CALL_WILL_CHANGE_NULLABILITY for testData
* Change EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_WARNING to EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR
* Change NON_EXHAUSTIVE_WHEN_STATEMENT to NO_ELSE_IN_WHEN
* Fix testData for SafeCallsAreAlwaysNullable
* Change T -> T & Any in test dumps
* Change INVALID_CHARACTERS_NATIVE_WARNING -> INVALID_CHARACTERS_NATIVE_ERROR
* TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING -> TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR
2022-02-25 11:46:27 +00:00
Roman Golyshev f1f2c7cce5 FIR IDE: Small fixes 2022-02-25 01:54:25 +03:00
Jinseong Jeon 1b276a3c59 AA: allow enum generated declarations for psi retrieval 2022-02-24 17:51:51 +01:00
Jinseong Jeon 1b6ded6005 FIR/LC: create synthetic members of enum class
^KTIJ-17414 In Progress
^KTIJ-17444 In Progress
2022-02-24 17:51:50 +01:00
Jinseong Jeon 26e7fc9da3 FIR LC: avoid hardcoded annotation name 2022-02-24 17:51:49 +01:00
Jinseong Jeon f49a42895f FIR LC: use StandardNames (instead of hardcoded constants) 2022-02-24 17:51:47 +01:00
Ivan Kochurkin f751f13c4d [FIR] Fix incompatible KClass<Any> and callable reference Collection::class, ^KT-51272 Fixed 2022-02-23 14:21:59 +03:00
Ivan Kochurkin 31d9313c51 [FIR] Fix "Expected some types" exception, ^KT-51274 Fixed 2022-02-23 14:21:59 +03:00
Mikhail Glukhikh 981f8b1871 FIR: implement resolve of unqualified enum references in when
See KT-16768
2022-02-22 22:13:06 +03:00
Dmitriy Novozhilov b47cc86c57 [FIR] Fix incorrect context usages with withSuppressedDiagnostics call 2022-02-18 17:44:40 +03:00
Dmitriy Novozhilov ccb74b6477 [FIR] Fix computing compatibility of expect and actual modality 2022-02-18 17:44:39 +03:00
Dmitriy Novozhilov 23af5510a6 [FIR] Render full declaration header in diagnostic messages 2022-02-18 17:44:38 +03:00
Dmitriy Novozhilov 2fa6425965 [LL] Add proper equals and hashCode for KtModuleBasedModuleData 2022-02-18 17:44:37 +03:00
Dmitriy Novozhilov 851305f981 [FIR] Allow smartcasts on member properties for classes from dependsOn dependencies 2022-02-18 17:44:37 +03:00
Mark Punzalan afb34d3193 Analysis API: Implement KtCallResolver.collectAllCandidates for FE 1.0. 2022-02-17 19:51:35 +01:00
Mikhail Glukhikh 4902e517d3 FIR: add test for KT-51357 2022-02-17 15:04:36 +00:00
Jinseong Jeon ac46ce908f AA: consider directories with class files when creating a lib module 2022-02-16 22:06:15 +01:00
Jinseong Jeon 552bfc9e39 LL: rename files according to class names in them 2022-02-16 22:06:14 +01:00
Jinseong Jeon 63d033e0a1 AA: remove Ide prefix from deserialized declaration source provider 2022-02-16 22:06:14 +01:00
Victor Petukhov 0518b84b0b [FE] Remove unused SoundSmartcastFromLoopConditionForLoopAssignedVariables language feature 2022-02-16 18:41:52 +03:00
Mikhail Glukhikh 2ac2fa5353 Flatten if chains also in LT FIR 2022-02-15 11:48:54 +03:00
Ilmir Usmanov 909b455758 Support generic underlying type of inline class in FIR
#KT-32162
2022-02-15 08:11:09 +01:00
Victor Petukhov a54c9edaad [FE 1.0] Report progressions resolve changing warning while calling Java methods which pass Collection
^KT-51062 Fixed
2022-02-14 15:43:43 +03:00
Mark Punzalan f1623347d8 Analysis API: Use stub FirDataFlowAnalyzer when getting candidates. 2022-02-11 13:22:58 +01:00
Mark Punzalan 3f3873dc50 Analysis API: Return KtCallCandidateInfo instead of KtCallInfo in
KtCallResolver.collectAllCandidates().
2022-02-11 13:22:58 +01:00
Mark Punzalan b8cdfc5aad Analysis API: Move AllCandidatesResolver closer to
SingleCandidateResolver and share common code.
2022-02-11 13:22:58 +01:00
Mark Punzalan 7a1ef25333 Analysis API: Rename resolveCandidates to collectCallCandidates.
Didn't bother to rename the directory in the test data.
2022-02-11 13:22:58 +01:00
Mark Punzalan 58c6c25fe9 Analysis API: Handle other FirElements in
KtCallResolver.resolveCandidates() and copy over remaining tests.
2022-02-11 13:22:58 +01:00
Mark Punzalan 9b9da94a09 Analysis API: Fix issues related to implicit invoke calls:
- Correctly set explicit receiver value.
- Restore original function call from FirImplicitFunctionCall (i.e.,
calls implicitly resolved to `invoke`) to get the correct name for
getting all candidates.
- Collect candidates at all tower levels.

Also make order of candidate calls in tests deterministic.
2022-02-11 13:22:58 +01:00
Mark Punzalan ace826c570 Analysis API: Get argument mapping from candidate and type parameters
from candidate symbol.
2022-02-11 13:22:58 +01:00
Mark Punzalan 0ed802bca4 Analysis API: Add tests for KtCallResolver.resolveCandidates(). 2022-02-11 13:22:57 +01:00