Fixed FindUsages case on look up implementation getter/setters via property names

#KT-40788 Fixed
#KT-24616 Fixed

back-port from kotlin-ide commit aa5580bb5a7e96b209cdaa1c82f4e485ee001ae8
This commit is contained in:
Vladimir Dolzhenko
2020-08-10 22:02:44 +02:00
parent e49cdf0ca2
commit 8540f47c15
86 changed files with 157 additions and 61 deletions
@@ -23,3 +23,5 @@ enum class E {
open fun <caret>foo(n: Int): Int = n
}
// DISABLE-ERRORS
@@ -16,3 +16,5 @@ fun test(i: I) {
A().foo()
B().foo()
}
// DISABLE-ERRORS
@@ -13,3 +13,5 @@ fun foo() {
}
bar()
// DISABLE-ERRORS
@@ -15,3 +15,4 @@ fun foo(n: Int) {
}
val foo: Int
// DISABLE-ERRORS
@@ -43,3 +43,5 @@ fun B.foo(s: String, n: Number) {
fun bar(b: B) {
b.foo("", 0)
}
// DISABLE-ERRORS
@@ -21,3 +21,4 @@ fun A.foo(s: String) {
fun X.foo(n: Int) {
}
// DISABLE-ERRORS
@@ -11,4 +11,5 @@ public open class Server() {
public class ServerEx(): Server() {
override fun processRequest() = "foo" + doProcessRequest()
}
// DISABLE-ERRORS
@@ -0,0 +1,9 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
// CHECK_SUPER_METHODS_YES_NO_DIALOG: no
// OPTIONS: usages
class SomeXImpl: SomeX {
override fun <caret>getSmth(): String = TODO()
}
fun foo(x: SomeXImpl) = x.smth
@@ -0,0 +1,4 @@
public interface SomeX {
String getSmth();
}
@@ -0,0 +1 @@
Value read 9 fun foo(x: SomeXImpl) = x.smth
@@ -11,3 +11,5 @@ fun main(a: A) {
a.copy(1)
B(0).copy(1)
}
// DISABLE-ERRORS