Commit Graph

13 Commits

Author SHA1 Message Date
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