[Analysis API] Shortener: don't add import if it affects usages

^KTIJ-24096 Fixed
This commit is contained in:
aleksandrina-streltsova
2023-05-03 10:31:12 +03:00
committed by teamcity
parent 338c2433ac
commit a96e2f37e7
7 changed files with 100 additions and 12 deletions
@@ -0,0 +1,8 @@
// FILE: main.kt
class SortedSet
fun test() {
val a = <expr>java.util.SortedSet</expr>
}
fun foo(set: SortedSet)
@@ -0,0 +1,5 @@
Before shortening: java.util.SortedSet
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
with SHORTEN_AND_STAR_IMPORT:
@@ -0,0 +1,6 @@
// FILE: main.kt
class SortedSet
fun test() {
val a = <expr>java.util.SortedSet</expr>
}
@@ -0,0 +1,6 @@
Before shortening: java.util.SortedSet
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] java.util.SortedSet
with SHORTEN_AND_STAR_IMPORT: