Extract Interface/Pull Up: Warn about private members with usages in the original class
#KT-15606 Fixed
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
open class A
|
||||
|
||||
class <caret>Foo : A() {
|
||||
// INFO: {checked: "true"}
|
||||
private fun privateFun() = 0
|
||||
|
||||
fun refer() = privateFun()
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
open class A {
|
||||
// INFO: {checked: "true"}
|
||||
protected fun privateFun() = 0
|
||||
}
|
||||
|
||||
class Foo : A() {
|
||||
|
||||
fun refer() = privateFun()
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
interface I
|
||||
|
||||
class <caret>Foo : I {
|
||||
// INFO: {checked: "true"}
|
||||
private fun privateFun() = 0
|
||||
|
||||
fun refer() = privateFun()
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
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