Unused symbol: remove forced "used" from actual declarations
Now we really check whether actual declaration has usages (in expect or actual code) or not Related to KT-17512 Related to KT-15666
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
expect class My constructor() {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
fun test() {
|
||||
My().foo()
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
expect class My constructor() {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
fun test() {
|
||||
My().foo()
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Safe delete 'foo'" "false"
|
||||
// TOOL: org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection
|
||||
// ACTION: Convert member to extension
|
||||
// ACTION: Move to companion object
|
||||
|
||||
actual class My {
|
||||
actual fun <caret>foo() {}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Safe delete 'foo'" "false"
|
||||
// TOOL: org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection
|
||||
// ACTION: Convert member to extension
|
||||
// ACTION: Move to companion object
|
||||
|
||||
actual class My {
|
||||
actual fun foo() {}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
expect class My constructor() {
|
||||
// TODO: also should be deleted (KT-15666)
|
||||
fun foo()
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
expect class My constructor() {
|
||||
// TODO: also should be deleted (KT-15666)
|
||||
fun foo()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Safe delete 'foo'" "true"
|
||||
// TOOL: org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection
|
||||
|
||||
actual class My {
|
||||
actual fun <caret>foo() {}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Safe delete 'foo'" "true"
|
||||
// TOOL: org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection
|
||||
|
||||
actual class My {
|
||||
}
|
||||
Reference in New Issue
Block a user