Fix search usages for invoke() with vararg parameter (KT-18479)

#KT-18479 Fixed
This commit is contained in:
Nikolay Krasko
2017-06-14 19:08:18 +03:00
parent 018d4653e8
commit 60c8d5dcc0
5 changed files with 34 additions and 1 deletions
@@ -0,0 +1,15 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
// OPTIONS: usages
package pack
class P {
operator fun <caret>invoke(vararg i: Int) = 1
}
fun f(p: P) {
p()
p(1, 2)
p(1)
p.invoke()
p.invoke(1, 2, 3)
}
@@ -0,0 +1,7 @@
Resolved p()
Resolved p(1)
Resolved p(1, 2)
Searched references to pack.P
Searched references to parameter p of pack.f(p: P) in non-Java files
Used plain search of pack.P.invoke(vararg i: Int) in LocalSearchScope:
CLASS:P
@@ -0,0 +1,5 @@
Function call 13 p.invoke()
Function call 14 p.invoke(1, 2, 3)
Implicit 'invoke' 10 p()
Implicit 'invoke' 11 p(1, 2)
Implicit 'invoke' 12 p(1)