Roman Golyshev
52d6ac5ed0
[AA] Fix processing of member invoke functions from objects in reference shortening and import optimization
...
Correctly handle `KtDotQualifedExpression`s with function calls as
selectors (like `foo.Bar()`). Without such handling, processing of
member invoke calls on objects was broken both
for reference shortener (causing KTIJ-26695)
and import optimizer (causing KTIJ-23407)
Also, to fix KTIJ-23407, do not ignore qualifiers with
`ImplicitInvokeCall` fake source
^KTIJ-26695 Fixed
^KTIJ-23407 Fixed
2023-08-18 07:32:05 +00:00
Roman Golyshev
ef6e8ebb9b
KTIJ-26672 [AA] Correctly handle ConeAmbiguityError in KtFirImportOptimizer
...
Add a test case for missing call diagnostic just in case
^KTIJ-26672 Fixed
2023-08-16 19:25:59 +00:00
Roman Golyshev
73bfc88613
KTIJ-26501 [Analysis API] Do not ignore vararg type references in KtFirImportOptimizer
...
Turns out they have fake sources, so ignoring all
type qualifiers with fake sources in e1ebbc10d9
was incorrect.
^KTIJ-26501 Fixed
2023-08-03 11:55:57 +00:00
Roman Golyshev
e1ebbc10d9
KTIJ-24877 [Analysis API] Ignore type qualifiers with fake sources when optimizing imports
...
When optimizing imports, it does not make any sense to account for
type qualifiers which are not directly present in the code
ATM such implicit type references are present for every
callable declaration call
^KTIJ-24877 Fixed
2023-07-27 17:28:47 +00:00
Roman Golyshev
5e30adec06
KTIJ-26276 [Analysis API] Do not consider single aliased import from the same package as unused
...
Even when the aliased import comes from the same package, it cannot be
removed, because it will break the code
Also, add more tests for the imports coming from the same package
^KTIJ-26276 Fixed
2023-07-19 12:40:57 +00:00
Roman Golyshev
26dbeb9b6f
KTIJ-25530 [Analysis API] Add missing test cases for Java statics
...
Can be done now because KT-58980 is fixed
2023-06-21 18:37:09 +00:00
Ilya Kirillov
0ad98ff610
[Analysis API] use fe10-specific testdata for Fe10IdeNormalAnalysisSourceModuleAnalysisApiImportOptimizerTestGenerated
2023-06-21 12:04:31 +02:00
Roman Golyshev
bccd7bc04a
KTIJ-25341 [Analysis API] Visit component calls in import optimizer
...
N.B. K2 does not require resolved `componentX` functions for the
placeholder variables (`_`), see KT-59504
^KTIJ-25341 Fixed
2023-06-20 10:12:57 +00:00
Roman Golyshev
adab552928
KTIJ-25530 [Analysis API] Correctly collect references to implicitly dispatched callables in Import Optimizer
...
N.B. There is a case which is not covered ATM due to the bug in the
compiler, see KT-58980
^KTIJ-25530 Fixed
2023-06-19 16:02:09 +00:00
Roman Golyshev
e4390e47cf
[Analysis API] KTIJ-23588 Do not ignore calls qualified with objects
...
^KTIJ-23588 Fixed
2023-04-24 22:16:55 +00:00
Ilya Kirillov
15f19f324e
[Analysis API FIR] do not consider unresolved imports as unused in import optimizer
...
Otherwise, the import optimizer breaks incomplete code
^KTIJ-25034 fixed
2023-03-29 10:36:27 +00:00
Roman Golyshev
b23aabf6e0
[Analysis API] KTIJ-24610 Ignore qualifiers with fake source in KtFirImportOptimizer
...
Such qualifiers can appear for extensions imported from objects
^KTIJ-24610 Fixed
2023-02-14 16:08:40 +00:00
Marco Pennekamp
c5e5140c08
[Analysis API] Fix exceptions around type parameters being treated as callables
...
- `toResolvedCallableSymbol`: cast defensively because
the resolved symbol might not be a callable symbol.
- `toKtCallInfo`: Check that the resolved symbol is actually callable.
^KTIJ-23003 fixed
2022-11-17 18:58:38 +00:00
Roman Golyshev
4d6b424280
[FIR IDE] Properly handle generic types qualifiers
...
In code like `foo.Bar<Bazz>`, `Bar<Bazz>` is considered to be
`KtCallExpression` from the PSI point
^KT-52779 Fixed
2022-06-14 15:00:12 +00:00
Roman Golyshev
3f8fff55cf
FIR IDE: Fix ImportOptimizer for types used as generics' parameters
2021-12-24 16:31:34 +00:00
Ilya Kirillov
6f6a33e852
Analysis API: move testdata to corresponding components folders
2021-11-17 20:55:08 +01:00
Ilya Kirillov
42f0536904
FIR IDE: move analysis api fir testdata to the analysis directory
2021-09-15 11:32:43 +02:00