Down-shifting to plain search when operator usage search required

This commit is contained in:
Valentin Kipyatkov
2016-08-29 20:02:19 +03:00
parent 5682c917f9
commit 9cd7e9d519
5 changed files with 58 additions and 2 deletions
@@ -0,0 +1,16 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
// OPTIONS: usages
data class A(val <caret>x: Int, val y: Int) {
fun f() {
val (x, y) = this
}
}
class B
operator fun B.plus(other: B): A = TODO()
fun f(b1: B, b2: B) {
val (x, y) = b1 + b2
}
@@ -0,0 +1,5 @@
Searched inheritors of A
Searched references to A
Used plain search in LocalSearchScope:
CLASS:A
Used plain search in whole search scope
@@ -0,0 +1,2 @@
Value read 15 val (x, y) = b1 + b2
Value read 6 val (x, y) = this