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
Mark Punzalan
f62bdf5826
Analysis API: Move AbstractResolveCallTest from fir to components
...
package.
2022-02-11 13:22:57 +01:00
Mark Punzalan
4a09abc418
Analysis API: Add API functions to get all the candidates (with argument
...
mapping and substitutor) for a function call.
2022-02-11 13:22:57 +01:00
Vladimir Dolzhenko
918a91dbdf
Escape special names with backticks in test data
...
#KT-51248
2022-02-10 21:20:47 +00:00
Roman Golyshev
ca72790962
[FIR IDE] Hack checkIsInheritor until KT-51240 is fixed
...
We do not know for sure if there is any dependency between the
two classes passed to `checkIsInheritor`. To avoid the problem described
in KT-51240, we try to analyse them both and hope that the dependency
in some direction exists.
`NoCacheForModuleException` is introduced to signal about this
particular problem and avoid catching just any `NoSuchElementException`.
This hack is mainly done to fix very annoying KT-51240 for the time
being.
^KTIJ-20852 Fixed
2022-02-10 16:24:44 +03:00
Jinseong Jeon
02cfc8b821
AA: reuse CoreJarFileSystem from KotlinCoreEnvironment
2022-02-09 23:11:45 +01:00
Jinseong Jeon
6b4c4457d8
LL: fix a typo in LLFirSessionFactory
2022-02-09 23:11:45 +01:00
Jinseong Jeon
9be6520c96
AA: avoid NPE in compile-time constant evaluator
2022-02-09 23:11:44 +01:00
Jinseong Jeon
a986aff429
AA: refactor service registrations
...
such that AA standalone mode doesn't need to unregister services that
were already registered by pre-analysis handlers
2022-02-09 23:11:44 +01:00
Jinseong Jeon
26e923e3ae
AA: introduce static project structure provider by compiler configuration
...
Also add standalone mode utils to configure Application/Project environments
2022-02-09 23:11:43 +01:00
Jinseong Jeon
d219de0f88
AA: avoid FIR dependency in frontend-independent module
2022-02-09 23:11:43 +01:00
Jinseong Jeon
6afd665c8d
AA: rename the file according to the static factory in it
2022-02-09 23:11:42 +01:00
Jinseong Jeon
fac4e5b243
LL: remove identical test impl for SealedClassInheritorsProvider
2022-02-09 23:11:42 +01:00
Roman Golyshev
42010282d5
[FIR IDE] Use correct extension receiver FIR expression in completion
...
`getOrBuildFir` does not record `FirCheckedSafeCallSubject`
expression, and it would be impossible to get them anyway
since there are no PSI corresponding to "not null receiver"
in expressions like `foo?.bar` - there is only `foo`,
which is considered nullable by FIR
`FirCheckedSafeCallSubject` wrapper has non-null type during
resolve, and it becomes very important in
`KtFirCompletionCandidateChecker`. If we loose the wrapper,
then it would be impossible to call extensions on nullable
types using `?.` syntax
^KTIJ-21021 Fixed
2022-02-07 22:06:28 +00:00
Ivan Kochurkin
f32c355190
[FIR] Correct resolving of sam with suspend function from another module, ^KT-51007 Fixed
...
Ignore fir ide test probably because of KT-50732
2022-02-07 17:22:02 +03:00
Ivan Kochurkin
17c64cf955
[FIR] Add INV to UNARY_OPERATION_NAMES, ^KT-50998 Fixed
2022-02-07 17:22:02 +03:00
Ivan Kochurkin
30871fc08f
[FIR] Infer labeled type for lambda in return in catch ^KT-51009 Fixed
2022-02-07 17:22:01 +03:00