Move: Filter out usages with visibility error before refactoring

If declaration is already invisible before move,
no visibility conflict should be reported

 #KT-17571 Fixed
This commit is contained in:
Alexey Sedunov
2017-04-24 18:24:07 +03:00
parent 0a5f9d8181
commit 8bbf8e185a
46 changed files with 32 additions and 44 deletions
@@ -0,0 +1,9 @@
package a
private class Foo {
}
private fun foo(value: Foo) {
}
@@ -0,0 +1,9 @@
package a;
import b.TestKt;
class J {
void bar() {
TestKt.test();
}
}
@@ -0,0 +1,7 @@
package a
import b.test
fun bar() {
test()
}
@@ -0,0 +1,8 @@
package b
import a.Foo
import a.foo
private fun test() {
foo(Foo())
}
@@ -0,0 +1,9 @@
package a
private class Foo {
}
private fun foo(value: Foo) {
}
@@ -0,0 +1,5 @@
package a
private fun <caret>test() {
foo(Foo())
}
@@ -0,0 +1,7 @@
package a;
class J {
void bar() {
MainKt.test();
}
}
@@ -0,0 +1,5 @@
package a
fun bar() {
test()
}
@@ -0,0 +1,5 @@
{
"mainFile": "a/main.kt",
"type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS",
"targetPackage": "b"
}