Move: Fix detection of imported declarations and processing of extension usages
#KT-5787 Fixed #KT-4959 Fixed
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
package library
|
||||
|
||||
open public class B {
|
||||
fun foo(): B = this
|
||||
}
|
||||
|
||||
fun B.bar(): B = this
|
||||
@@ -0,0 +1,5 @@
|
||||
package source
|
||||
|
||||
import target.A
|
||||
|
||||
fun test1() = target.test(A())
|
||||
@@ -0,0 +1,21 @@
|
||||
package target
|
||||
|
||||
import library.B
|
||||
import library.bar
|
||||
|
||||
public class A: B() {
|
||||
fun test() {
|
||||
bar()
|
||||
foo()
|
||||
this.bar()
|
||||
this.foo()
|
||||
}
|
||||
}
|
||||
|
||||
public fun test(a: A) {
|
||||
a.bar()
|
||||
a.foo()
|
||||
B().foo().bar()
|
||||
B().foo().bar()
|
||||
B().bar().foo()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package target
|
||||
|
||||
fun test2() = test(A())
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package library
|
||||
|
||||
open public class B {
|
||||
fun foo(): B = this
|
||||
}
|
||||
|
||||
fun B.bar(): B = this
|
||||
@@ -0,0 +1,21 @@
|
||||
package source
|
||||
|
||||
import library.B
|
||||
import library.bar
|
||||
|
||||
public class A: B() {
|
||||
fun test() {
|
||||
bar()
|
||||
foo()
|
||||
this.bar()
|
||||
this.foo()
|
||||
}
|
||||
}
|
||||
|
||||
public fun test(a: A) {
|
||||
a.bar()
|
||||
a.foo()
|
||||
B().foo().bar()
|
||||
library.B().foo().bar()
|
||||
B().bar().foo()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package source
|
||||
|
||||
fun test1() = test(A())
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package target
|
||||
|
||||
fun test2() = source.test(source.A())
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mainFile": "source/A.kt",
|
||||
"type": "MOVE_FILES",
|
||||
"targetPackage": "target"
|
||||
}
|
||||
Reference in New Issue
Block a user