[FIR][AA] Rely more on isInBestCandidates flag KtFirReferenceShortener
After the KT-61568 has been fixed, `isInBestCandidates` correctly works in more cases, and can be more reliably used in `KtFirReferenceShortener` ^KTIJ-26808 Fixed ^KTIJ-26840 Fixed
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
package test
|
||||
|
||||
class MyClass {
|
||||
companion object {
|
||||
val prop = ""
|
||||
}
|
||||
|
||||
object Other {
|
||||
val prop = ""
|
||||
|
||||
fun usage() {
|
||||
println(<expr>MyClass.prop</expr>)
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
Before shortening: MyClass.prop
|
||||
with DO_NOT_SHORTEN:
|
||||
with SHORTEN_IF_ALREADY_IMPORTED:
|
||||
with SHORTEN_AND_IMPORT:
|
||||
with SHORTEN_AND_STAR_IMPORT:
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
import dependency.Middle
|
||||
import dependency.Base
|
||||
|
||||
class MyClass : Middle {
|
||||
<expr>fun usage() {
|
||||
Middle.test()
|
||||
Base.test()
|
||||
}</expr>
|
||||
}
|
||||
|
||||
// FILE: dependency/Middle.java
|
||||
package dependency;
|
||||
|
||||
public class Middle extends Base {
|
||||
public static void test() {}
|
||||
}
|
||||
|
||||
// FILE: dependency/Base.java
|
||||
package dependency;
|
||||
|
||||
public class Base {
|
||||
public static void test() {}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
Before shortening: fun usage() {
|
||||
Middle.test()
|
||||
Base.test()
|
||||
}
|
||||
with DO_NOT_SHORTEN:
|
||||
with SHORTEN_IF_ALREADY_IMPORTED:
|
||||
[qualifier] Middle.test()
|
||||
with SHORTEN_AND_IMPORT:
|
||||
[qualifier] Middle.test()
|
||||
with SHORTEN_AND_STAR_IMPORT:
|
||||
[qualifier] Middle.test()
|
||||
Reference in New Issue
Block a user