Extract Superclass: Report private members used in abstracted members
#KT-16284 Fixed
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// NAME: I
|
||||
|
||||
// SIBLING:
|
||||
class <caret>PrivateRef {
|
||||
// INFO: {checked: "true", toAbstract: "false"}
|
||||
private fun privateFun() = 0
|
||||
// INFO: {checked: "true", toAbstract: "true"}
|
||||
fun refer() = privateFun()
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
Function 'fun refer(): Int' uses function 'fun privateFun(): Int' which won't be accessible from the subclass.
|
||||
@@ -0,0 +1,11 @@
|
||||
interface I {
|
||||
// INFO: {checked: "true"}
|
||||
fun privateFun() = 0
|
||||
}
|
||||
|
||||
// NAME: I
|
||||
// SIBLING:
|
||||
class Foo : I {
|
||||
|
||||
fun refer() = privateFun()
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
Function 'fun privateFun(): Int' can't be moved to the interface because it's private and has usages in the original class
|
||||
Reference in New Issue
Block a user