Avoid conflicts when moving members wiith package-local visibility

Add tests for Java "Move members" refactoring
 #KT-4459 Fixed
This commit is contained in:
Alexey Sedunov
2014-02-24 18:58:08 +04:00
parent d7aa8e7fc8
commit 5ba49fbada
192 changed files with 1178 additions and 1 deletions
@@ -0,0 +1,8 @@
public class B {
public static class C {
public static void foo(String s) {
System.out.println(s)
}
}
}
@@ -0,0 +1,3 @@
fun bar(s: String) {
B.C.foo(s)
}
@@ -0,0 +1,5 @@
import A.*
fun bar(s: String) {
B.C.foo(s)
}
@@ -0,0 +1,5 @@
import B.*
fun bar(s: String) {
C.foo(s)
}
@@ -0,0 +1,5 @@
import B.C.foo as foofoo
fun bar(s: String) {
foofoo(s)
}
@@ -0,0 +1,5 @@
public class B {
public static class C {
}
}
@@ -0,0 +1,5 @@
public class A {
public static void <caret>foo(String s) {
System.out.println(s)
}
}
@@ -0,0 +1,3 @@
fun bar(s: String) {
A.foo(s)
}
@@ -0,0 +1,5 @@
import A.*
fun bar(s: String) {
foo(s)
}
@@ -0,0 +1,5 @@
import B.*
fun bar(s: String) {
A.foo(s)
}
@@ -0,0 +1,5 @@
import A.foo as foofoo
fun bar(s: String) {
foofoo(s)
}
@@ -0,0 +1,5 @@
{
"mainFile": "main.java",
"type": "MOVE_MEMBERS",
"targetClass": "B.C"
}