Move: Implement more accurate 'protected' visibility check
#KT-17545 Fixed
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
package bar
|
||||
|
||||
open class Older {
|
||||
protected object ProtectedObject { val inProtectedObject = 0 }
|
||||
protected class ProtectedClass { val inProtectedClass = 0 }
|
||||
protected fun protectedFun() = 0
|
||||
protected var protectedVar = 0
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package foo
|
||||
|
||||
import bar.Older
|
||||
|
||||
class Younger : Older() {
|
||||
protected val v1: ProtectedObject = ProtectedObject
|
||||
val v2 = ProtectedObject.inProtectedObject
|
||||
protected val v3: ProtectedClass = ProtectedClass()
|
||||
val v4 = ProtectedClass().inProtectedClass
|
||||
val v5 = protectedFun()
|
||||
val v6 = protectedVar
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package foo
|
||||
|
||||
open class <caret>Older {
|
||||
protected object ProtectedObject { val inProtectedObject = 0 }
|
||||
protected class ProtectedClass { val inProtectedClass = 0 }
|
||||
protected fun protectedFun() = 0
|
||||
protected var protectedVar = 0
|
||||
}
|
||||
|
||||
class Younger : Older() {
|
||||
protected val v1: ProtectedObject = ProtectedObject
|
||||
val v2 = ProtectedObject.inProtectedObject
|
||||
protected val v3: ProtectedClass = ProtectedClass()
|
||||
val v4 = ProtectedClass().inProtectedClass
|
||||
val v5 = protectedFun()
|
||||
val v6 = protectedVar
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mainFile": "foo/test.kt",
|
||||
"type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS",
|
||||
"targetPackage": "bar"
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package bar
|
||||
|
||||
import foo.Older
|
||||
|
||||
class Younger : Older() {
|
||||
protected val v1: ProtectedObject = ProtectedObject
|
||||
val v2 = ProtectedObject.inProtectedObject
|
||||
protected val v3: ProtectedClass = ProtectedClass()
|
||||
val v4 = ProtectedClass().inProtectedClass
|
||||
val v5 = protectedFun()
|
||||
val v6 = protectedVar
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package foo
|
||||
|
||||
open class Older {
|
||||
protected object ProtectedObject { val inProtectedObject = 0 }
|
||||
protected class ProtectedClass { val inProtectedClass = 0 }
|
||||
protected fun protectedFun() = 0
|
||||
protected var protectedVar = 0
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package foo
|
||||
|
||||
open class Older {
|
||||
protected object ProtectedObject { val inProtectedObject = 0 }
|
||||
protected class ProtectedClass { val inProtectedClass = 0 }
|
||||
protected fun protectedFun() = 0
|
||||
protected var protectedVar = 0
|
||||
}
|
||||
|
||||
class <caret>Younger : Older() {
|
||||
protected val v1: ProtectedObject = ProtectedObject
|
||||
val v2 = ProtectedObject.inProtectedObject
|
||||
protected val v3: ProtectedClass = ProtectedClass()
|
||||
val v4 = ProtectedClass().inProtectedClass
|
||||
val v5 = protectedFun()
|
||||
val v6 = protectedVar
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mainFile": "foo/test.kt",
|
||||
"type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS",
|
||||
"targetPackage": "bar"
|
||||
}
|
||||
Reference in New Issue
Block a user