Move: More accurate visibility analysis
#KT-10553 Fixed
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
private class B {
|
||||
private class D
|
||||
|
||||
private class C {
|
||||
private val d = D()
|
||||
}
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
private class B {
|
||||
private class D
|
||||
|
||||
private class <caret>C {
|
||||
private val d = D()
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
Class C uses class D which will be inaccessible after move
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"mainFile": "main.kt",
|
||||
"type": "MOVE_KOTLIN_NESTED_CLASS",
|
||||
"targetClass": "A",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
class A {
|
||||
open class B {
|
||||
protected class D
|
||||
|
||||
protected class C {
|
||||
private val d = D()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class X : A.B() {
|
||||
private val c = A.B.C()
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
class A {
|
||||
open class B {
|
||||
protected class D
|
||||
|
||||
protected class <caret>C {
|
||||
private val d = D()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class X : A.B() {
|
||||
private val c = A.B.C()
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Class C uses class D which will be inaccessible after move
|
||||
Property c uses class C which will be inaccessible after move
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"mainFile": "main.kt",
|
||||
"type": "MOVE_KOTLIN_NESTED_CLASS",
|
||||
"targetClass": "A",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
private val a = B()
|
||||
|
||||
private class B {
|
||||
private val c = C()
|
||||
}
|
||||
|
||||
private class C()
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
private val a = B()
|
||||
|
||||
private class <caret>B {
|
||||
private val c = C()
|
||||
}
|
||||
|
||||
private class C()
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Class B uses constructor C() which will be inaccessible after move
|
||||
Property a uses class B which will be inaccessible after move
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mainFile": "main.kt",
|
||||
"type": "MOVE_KOTLIN_NESTED_CLASS",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
open class A {
|
||||
private val a = B()
|
||||
|
||||
protected class B {
|
||||
private val c = C()
|
||||
}
|
||||
|
||||
protected class C()
|
||||
}
|
||||
|
||||
class X : A() {
|
||||
private val b = B()
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
open class A {
|
||||
private val a = B()
|
||||
|
||||
protected class <caret>B {
|
||||
private val c = C()
|
||||
}
|
||||
|
||||
protected class C()
|
||||
}
|
||||
|
||||
class X : A() {
|
||||
private val b = B()
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
Class B uses constructor C() which will be inaccessible after move
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mainFile": "main.kt",
|
||||
"type": "MOVE_KOTLIN_NESTED_CLASS",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class B {
|
||||
private val c = A.C()
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
open class A {
|
||||
private val a = B()
|
||||
|
||||
class C()
|
||||
}
|
||||
|
||||
class X : A() {
|
||||
private val b = B()
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
open class A {
|
||||
private val a = B()
|
||||
|
||||
protected class <caret>B {
|
||||
private val c = C()
|
||||
}
|
||||
|
||||
class C()
|
||||
}
|
||||
|
||||
class X : A() {
|
||||
private val b = B()
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mainFile": "main.kt",
|
||||
"type": "MOVE_KOTLIN_NESTED_CLASS",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
Class a.Test uses package-private class a.Foo
|
||||
Class a.Test uses package-private function a.foo
|
||||
Package-private class a.Test will no longer be accessible from method J.bar()
|
||||
Package-private class a.Test will no longer be accessible from variable a.bar.t
|
||||
Class Test uses class Foo which will be inaccessible after move
|
||||
Class Test uses function foo() which will be inaccessible after move
|
||||
Method bar() uses class Test which will be inaccessible after move
|
||||
Variable t uses class Test which will be inaccessible after move
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
Function a.test uses package-private class a.Foo
|
||||
Function a.test uses package-private function a.foo
|
||||
Package-private function a.test will no longer be accessible from function a.bar
|
||||
Package-private function a.test will no longer be accessible from method J.bar()
|
||||
Function bar() uses function test() which will be inaccessible after move
|
||||
Function test() uses class Foo which will be inaccessible after move
|
||||
Function test() uses function foo() which will be inaccessible after move
|
||||
Method bar() uses function test() which will be inaccessible after move
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
Object a.Test uses package-private class a.Foo
|
||||
Object a.Test uses package-private function a.foo
|
||||
Package-private object a.Test will no longer be accessible from method J.bar()
|
||||
Package-private object a.Test will no longer be accessible from variable a.bar.t
|
||||
Method bar() uses object Test which will be inaccessible after move
|
||||
Object Test uses class Foo which will be inaccessible after move
|
||||
Object Test uses function foo() which will be inaccessible after move
|
||||
Variable t uses object Test which will be inaccessible after move
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
package a
|
||||
|
||||
private fun foo() {
|
||||
bar()
|
||||
}
|
||||
|
||||
private fun bar() {
|
||||
foo()
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
object Utils
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
package a
|
||||
|
||||
private fun <caret>foo() {
|
||||
bar()
|
||||
}
|
||||
|
||||
private fun bar() {
|
||||
foo()
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
object Utils
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Function bar() uses function foo() which will be inaccessible after move
|
||||
Function foo() uses function bar() which will be inaccessible after move
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mainFile": "main.kt",
|
||||
"type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS",
|
||||
"targetFile": "utils.kt"
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
package a
|
||||
|
||||
private val foo: Int
|
||||
get() = bar
|
||||
|
||||
private val bar: Int
|
||||
get() = foo
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
object Utils
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
package a
|
||||
|
||||
private val <caret>foo: Int
|
||||
get() = bar
|
||||
|
||||
private val bar: Int
|
||||
get() = foo
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package a
|
||||
|
||||
object Utils
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Property bar uses property foo which will be inaccessible after move
|
||||
Property foo uses property bar which will be inaccessible after move
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mainFile": "main.kt",
|
||||
"type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS",
|
||||
"targetFile": "utils.kt"
|
||||
}
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
Package-private property a.test will no longer be accessible from function a.bar
|
||||
Package-private property a.test will no longer be accessible from method J.bar()
|
||||
Property a.test uses package-private class a.Foo
|
||||
Property a.test uses package-private function a.foo
|
||||
Function bar() uses property test which will be inaccessible after move
|
||||
Method bar() uses property test which will be inaccessible after move
|
||||
Property test uses class Foo which will be inaccessible after move
|
||||
Property test uses function foo() which will be inaccessible after move
|
||||
Reference in New Issue
Block a user