Provide quick fix for named arguments to varargs in annotations

See more in KT-20171
This commit is contained in:
Mikhail Zarechenskiy
2017-09-15 14:53:45 +03:00
parent 66cb8db12a
commit 8ab7c26cae
11 changed files with 132 additions and 1 deletions
@@ -0,0 +1,7 @@
// "Replace with array call" "true"
// LANGUAGE_VERSION: 1.2
annotation class Some(vararg val strings: String)
@Some(strings = *<caret>[])
class My
@@ -0,0 +1,7 @@
// "Replace with array call" "true"
// LANGUAGE_VERSION: 1.2
annotation class Some(vararg val strings: String)
@Some(strings = <caret>[])
class My
@@ -0,0 +1,7 @@
// "Replace with array call" "true"
// LANGUAGE_VERSION: 1.2
annotation class Some(vararg val ints: Int)
@Some(ints = *[1, 2,<caret> 3])
class My
@@ -0,0 +1,7 @@
// "Replace with array call" "true"
// LANGUAGE_VERSION: 1.2
annotation class Some(vararg val ints: Int)
@Some(ints = [1, 2,<caret> 3])
class My
@@ -0,0 +1,7 @@
// "Replace with array call" "true"
// LANGUAGE_VERSION: 1.2
annotation class Some(vararg val strings: String)
@Some(strings = <caret>"value")
class My
@@ -0,0 +1,7 @@
// "Replace with array call" "true"
// LANGUAGE_VERSION: 1.2
annotation class Some(vararg val strings: String)
@Some(strings = ["value"])
class My