Indicate vararg parameters in Goto Symbol presentation

#KT-17899 Fixed
This commit is contained in:
Dmitry Jemerov
2017-05-16 15:26:52 +02:00
parent 14c343de35
commit 8f38d03b48
16 changed files with 18 additions and 16 deletions
@@ -77,7 +77,9 @@ class KtFunctionPresenter : ItemPresentationProvider<KtFunction> {
function.name?.let { append(it) } function.name?.let { append(it) }
append("(") append("(")
append(function.valueParameters.joinToString { it.typeReference?.text ?: "" }) append(function.valueParameters.joinToString {
(if (it.isVarArg) "vararg " else "") + (it.typeReference?.text ?: "")
})
append(")") append(")")
} }
} }
+1 -1
View File
@@ -2,4 +2,4 @@
// CHECK_BOX // CHECK_BOX
// SEARCH_TEXT: arrayListOf // SEARCH_TEXT: arrayListOf
// REF: (kotlin.collections).arrayListOf() // REF: (kotlin.collections).arrayListOf()
// REF: (kotlin.collections).arrayListOf(T) // REF: (kotlin.collections).arrayListOf(vararg T)
@@ -2,4 +2,4 @@
// CHECK_BOX // CHECK_BOX
// SEARCH_TEXT: arrayListOf // SEARCH_TEXT: arrayListOf
// REF: (kotlin.collections).arrayListOf() // REF: (kotlin.collections).arrayListOf()
// REF: (kotlin.collections).arrayListOf(T) // REF: (kotlin.collections).arrayListOf(vararg T)
+1 -1
View File
@@ -7,4 +7,4 @@ fun main(args : Array<String>) {
var a = <caret>IntArray(array(1, 2, 3)) var a = <caret>IntArray(array(1, 2, 3))
} }
// REF: (ctrl_click).IntArray(Int) // REF: (ctrl_click).IntArray(vararg Int)
+1 -1
View File
@@ -6,4 +6,4 @@ fun test(f: Foo) {
f() <caret>{} f() <caret>{}
} }
// REF: (in Foo).invoke(Any) // REF: (in Foo).invoke(vararg Any)
+1 -1
View File
@@ -6,4 +6,4 @@ fun test(f: Foo) {
f <caret>{} f <caret>{}
} }
// REF: (in Foo).invoke(Any) // REF: (in Foo).invoke(vararg Any)
@@ -6,4 +6,4 @@ fun test(f: Foo) {
f f@ <caret>{} f f@ <caret>{}
} }
// REF: (in Foo).invoke(Any) // REF: (in Foo).invoke(vararg Any)
@@ -6,4 +6,4 @@ fun test(f: Foo) {
f {<caret>} f {<caret>}
} }
// REF: (in Foo).invoke(Any) // REF: (in Foo).invoke(vararg Any)
+1 -1
View File
@@ -6,4 +6,4 @@ fun test(f: Foo) {
f<caret>() f<caret>()
} }
// REF: (in Foo).invoke(Any) // REF: (in Foo).invoke(vararg Any)
+1 -1
View File
@@ -6,4 +6,4 @@ fun test(f: Foo) {
f(<caret>) f(<caret>)
} }
// REF: (in Foo).invoke(Any) // REF: (in Foo).invoke(vararg Any)
@@ -6,4 +6,4 @@ fun test(f: Foo) {
f() { 1<caret>} f() { 1<caret>}
} }
// REF: (in Foo).invoke(Any) // REF: (in Foo).invoke(vararg Any)
+1 -1
View File
@@ -6,4 +6,4 @@ fun test(f: Foo) {
f<caret>(1) f<caret>(1)
} }
// REF: (in Foo).invoke(Any) // REF: (in Foo).invoke(vararg Any)
+1 -1
View File
@@ -6,4 +6,4 @@ fun test(f: Foo) {
f(1<caret>) f(1<caret>)
} }
// REF: (in Foo).invoke(Any) // REF: (in Foo).invoke(vararg Any)
@@ -1,4 +1,4 @@
val g = lis<caret>tOf("a", "b", "c") val g = lis<caret>tOf("a", "b", "c")
// REF: (kotlin.collections).listOf(T) // REF: (kotlin.collections).listOf(vararg T)
// FILE: collections/CollectionsKt.class // FILE: collections/CollectionsKt.class
@@ -1,4 +1,4 @@
val g = lis<caret>tOf("a", "b", "c") val g = lis<caret>tOf("a", "b", "c")
// REF: (kotlin.collections).listOf(T) // REF: (kotlin.collections).listOf(vararg T)
// FILE: collections/Collections.kt // FILE: collections/Collections.kt
+1 -1
View File
@@ -1,4 +1,4 @@
fun foo() { fun foo() {
@[Deprecated] fun innerFoo() { @Deprecated fun innerFoo() {
} }
} }