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:
+9
@@ -0,0 +1,9 @@
|
||||
package a
|
||||
|
||||
private class Foo {
|
||||
|
||||
}
|
||||
|
||||
private fun foo(value: Foo) {
|
||||
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
package a
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package a;
|
||||
|
||||
import b.TestKt;
|
||||
|
||||
class J {
|
||||
void bar() {
|
||||
TestKt.test();
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package a
|
||||
|
||||
import b.test
|
||||
|
||||
fun bar() {
|
||||
test()
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package b
|
||||
|
||||
import a.Foo
|
||||
import a.foo
|
||||
|
||||
private fun test() {
|
||||
foo(Foo())
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package a
|
||||
|
||||
private class Foo {
|
||||
|
||||
}
|
||||
|
||||
private fun foo(value: Foo) {
|
||||
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package a
|
||||
|
||||
private fun <caret>test() {
|
||||
foo(Foo())
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package a;
|
||||
|
||||
class J {
|
||||
void bar() {
|
||||
MainKt.test();
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package a
|
||||
|
||||
fun bar() {
|
||||
test()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mainFile": "a/main.kt",
|
||||
"type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS",
|
||||
"targetPackage": "b"
|
||||
}
|
||||
Reference in New Issue
Block a user