Copy: Fix import insertion on declaration copying

#KT-19909 Fixed
This commit is contained in:
Alexey Sedunov
2017-09-19 16:37:09 +03:00
parent 0beadddb7f
commit c8c0ab1647
8 changed files with 52 additions and 1 deletions
@@ -0,0 +1,3 @@
package bar
fun Any.bar() {}
@@ -0,0 +1,12 @@
package foo
import bar.bar
class Foo {
init {
42.bar()
}
}
class Baz {
}
@@ -0,0 +1,9 @@
package foo
import bar.bar
class Foo2 {
init {
42.bar()
}
}
@@ -0,0 +1,3 @@
package bar
fun Any.bar() {}
@@ -0,0 +1,12 @@
package foo
import bar.bar
class <caret>Foo {
init {
42.bar()
}
}
class Baz {
}
@@ -0,0 +1,5 @@
{
"mainFile": "foo/Foo.kt",
"targetPackage": "foo",
"newName": "Foo2"
}