[Analysis API] Do not shorten qualifiers outside the selection range

^KTIJ-25116 Fixed
This commit is contained in:
aleksandrina-streltsova
2023-04-27 19:03:56 +03:00
committed by teamcity
parent ed7a3299f0
commit da5f33d762
7 changed files with 71 additions and 2 deletions
@@ -0,0 +1,14 @@
// FILE: main.kt
import dependency.A
fun test() {
val b = A.B(<expr>dependency.Foo()</expr>)
}
// FILE: dependency.kt
package dependency
class Foo
sealed class A {
class B(foo: Foo): A()
}
@@ -0,0 +1,7 @@
Before shortening: dependency.Foo()
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[qualifier] dependency.Foo()
with SHORTEN_AND_STAR_IMPORT:
[qualifier] dependency.Foo()
@@ -0,0 +1,14 @@
// FILE: main.kt
import dependency.A
fun test() {
val b: A.B<<expr>dependency.Foo</expr>>
}
// FILE: dependency.kt
package dependency
class Foo
sealed class A {
class B<T>: A()
}
@@ -0,0 +1,7 @@
Before shortening: dependency.Foo
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
with SHORTEN_AND_IMPORT:
[type] dependency.Foo
with SHORTEN_AND_STAR_IMPORT:
[type] dependency.Foo