Fix search usages for invoke() extension operator (KT-18269)

#KT-18269 Fixed
This commit is contained in:
Nikolay Krasko
2017-06-14 16:54:41 +03:00
parent 46512f34e4
commit 018d4653e8
5 changed files with 37 additions and 2 deletions
@@ -0,0 +1,11 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
// OPTIONS: usages
package pack
class P
operator fun P.<caret>invoke() = 1
fun f(p: P) {
p()
p.invoke()
}
@@ -0,0 +1,6 @@
Resolved p()
Searched references to pack.P
Searched references to parameter p of pack.f(p: P) in non-Java files
Used plain search of pack.invoke() in LocalSearchScope:
CLASS:P
FUN:invoke
@@ -0,0 +1,2 @@
Function call 10 p.invoke()
Implicit 'invoke' 9 p()