KTIJ-26103 [Analysis API] Ignore implicit dispatch receivers in Reference Shortener
Calls to extension functions imported from objects have implicit dispatch receivers, but those receivers are not present in the code and should not be analyzed by the shortener ^KTIJ-26103 Fixed
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// FILE: main.kt
|
||||
package test
|
||||
|
||||
import dependency.Bar.extFun
|
||||
|
||||
fun usage(str: String) {
|
||||
<expr>str.extFun()</expr>
|
||||
}
|
||||
|
||||
// FILE: dependency.kt
|
||||
package dependency
|
||||
|
||||
object Bar {
|
||||
fun String.extFun() {}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
Before shortening: str.extFun()
|
||||
with DO_NOT_SHORTEN:
|
||||
with SHORTEN_IF_ALREADY_IMPORTED:
|
||||
with SHORTEN_AND_IMPORT:
|
||||
with SHORTEN_AND_STAR_IMPORT:
|
||||
Reference in New Issue
Block a user