Added fake override search in unused symbol inspection #KT-13288 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-08-11 16:30:02 +03:00
parent 8de68e3e87
commit b3b83e344b
21 changed files with 255 additions and 3 deletions
+15
View File
@@ -0,0 +1,15 @@
// "Safe delete 'something'" "false"
// ACTION: Convert function to property
// ACTION: Convert to block body
// ACTION: Specify return type explicitly
interface Inter {
fun something(): String
}
class Impl : Inter {
override fun <caret>something() = "hi"
}
class Test: Inter by Impl() {
}
@@ -0,0 +1,3 @@
interface Inter {
String something();
}
@@ -0,0 +1,13 @@
// "Safe delete 'something'" "false"
// ACTION: Convert function to property
// ACTION: Convert member to extension
// ACTION: Convert to block body
// ACTION: Move to companion object
// ACTION: Specify return type explicitly
abstract class Abstract {
fun <caret>something() = "hi"
}
class Test: Abstract(), Inter {
}
@@ -0,0 +1,7 @@
interface Inter {
String something();
}
class Test extends Abstract implements Inter {
}
@@ -0,0 +1,10 @@
// "Safe delete 'something'" "false"
// ACTION: Convert function to property
// ACTION: Convert member to extension
// ACTION: Convert to block body
// ACTION: Move to companion object
// ACTION: Specify return type explicitly
abstract class Abstract {
fun <caret>something() = "hi"
}
@@ -0,0 +1,5 @@
class Test extends Abstract {
String something() {
return "123";
}
}
@@ -0,0 +1,11 @@
// "Safe delete 'something'" "false"
// ACTION: Convert function to property
// ACTION: Convert member to extension
// ACTION: Convert to block body
// ACTION: Move to companion object
// ACTION: Specify return type explicitly
abstract class Abstract {
open fun <caret>something() = "hi"
}
@@ -0,0 +1,4 @@
// "Safe delete 'something'" "true"
abstract class Abstract {
}
@@ -0,0 +1,9 @@
interface Inter {
String something();
}
class Test extends Abstract implements Inter {
String something() {
return "123";
}
}
@@ -0,0 +1,5 @@
// "Safe delete 'something'" "true"
abstract class Abstract {
fun <caret>something() = "hi"
}
@@ -0,0 +1,4 @@
// "Safe delete 'something'" "true"
abstract class Abstract {
}
@@ -0,0 +1,2 @@
class Test extends Abstract {
}
@@ -0,0 +1,5 @@
// "Safe delete 'something'" "true"
abstract class Abstract {
fun <caret>something() = "hi"
}
+8
View File
@@ -0,0 +1,8 @@
// "Safe delete 'something'" "true"
abstract class Abstract {
open fun <caret>something() = "hi"
}
class Test: Abstract() {
}
@@ -0,0 +1,7 @@
// "Safe delete 'something'" "true"
abstract class Abstract {
}
class Test: Abstract() {
}
+17
View File
@@ -0,0 +1,17 @@
// "Safe delete 'something'" "false"
// ACTION: Convert function to property
// ACTION: Convert member to extension
// ACTION: Convert to block body
// ACTION: Move to companion object
// ACTION: Specify return type explicitly
interface Inter {
fun something(): String
}
abstract class Abstract {
fun <caret>something() = "hi"
}
class Test: Abstract(), Inter {
}
+18
View File
@@ -0,0 +1,18 @@
// "Safe delete 'something'" "false"
// ACTION: Convert function to property
// ACTION: Convert member to extension
// ACTION: Convert to block body
// ACTION: Move to companion object
// ACTION: Specify return type explicitly
interface Inter {
fun something(): String
}
abstract class Abstract {
open fun <caret>something() = "hi"
}
class Test: Abstract(), Inter {
override fun something() = "bye"
}