Fix "Introduce import alias" on extensions
#KT-30214 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package my.sample
|
||||
|
||||
class A
|
||||
|
||||
fun A.check() {}
|
||||
|
||||
fun test() {
|
||||
val a = A()
|
||||
a.check<caret>()
|
||||
A().check()
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package my.sample
|
||||
|
||||
import my.sample.check as check1
|
||||
|
||||
class A
|
||||
|
||||
fun A.check() {}
|
||||
|
||||
fun test() {
|
||||
val a = A()
|
||||
a.check1()
|
||||
A().check1()
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
package my.sample
|
||||
|
||||
val Any.foo: Any get() = this
|
||||
val Any.bar: Any get() = this
|
||||
|
||||
fun test() {
|
||||
1.foo.foo.bar<caret>.foo.bar.toString()
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
package my.sample
|
||||
|
||||
import my.sample.bar as bar1
|
||||
|
||||
val Any.foo: Any get() = this
|
||||
val Any.bar: Any get() = this
|
||||
|
||||
fun test() {
|
||||
1.foo.foo.bar1.foo.bar1.toString()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
package my.sample
|
||||
|
||||
fun test() {
|
||||
0.let { true }.let<caret> { println(it) }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
package my.sample
|
||||
|
||||
import kotlin.let as let1
|
||||
|
||||
fun test() {
|
||||
0.let1 { true }.let1 { println(it) }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package my.sample
|
||||
|
||||
class A
|
||||
|
||||
fun A.check() {}
|
||||
|
||||
fun test() {
|
||||
(my.sample.A::check<caret>)(A())
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package my.sample
|
||||
|
||||
import my.sample.check as check1
|
||||
|
||||
class A
|
||||
|
||||
fun A.check() {}
|
||||
|
||||
fun test() {
|
||||
(my.sample.A::check1)(A())
|
||||
}
|
||||
Reference in New Issue
Block a user