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,9 @@
public class A {
public static void foo(String s) {
System.out.println(s)
}
}
public class B {
}
@@ -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 A.foo as foofoo
fun bar(s: String) {
foofoo(s)
}
@@ -0,0 +1,9 @@
public class A {
public static void <caret>foo(String s) {
System.out.println(s)
}
}
public class B {
}
@@ -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 A.foo as foofoo
fun bar(s: String) {
foofoo(s)
}
@@ -0,0 +1,3 @@
Method A.foo(String) is private and will not be accessible from file noImports.kt.
Method A.foo(String) is private and will not be accessible from file onDemandImport.kt.
Method A.foo(String) is private and will not be accessible from file specificImport.kt.
@@ -0,0 +1,6 @@
{
"mainFile": "main.java",
"type": "MOVE_MEMBERS",
"targetClass": "B",
"visibility": "private"
}