Provide quick fix for migration of single elements in named arguments
See more in KT-20171
This commit is contained in:
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// "Surround with *arrayOf(...)" "true"
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
|
||||
fun anyFoo(vararg a: Any) {}
|
||||
|
||||
fun test() {
|
||||
anyFoo(a = intArr<caret>ayOf(1))
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// "Surround with *arrayOf(...)" "true"
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
|
||||
fun anyFoo(vararg a: Any) {}
|
||||
|
||||
fun test() {
|
||||
anyFoo(a = *arrayOf(intArrayOf(1)))
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Surround with *intArrayOf(...)" "true"
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
|
||||
fun foo(vararg s: Int) {}
|
||||
|
||||
fun test() {
|
||||
foo(s = <caret>1)
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Surround with *intArrayOf(...)" "true"
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
|
||||
fun foo(vararg s: Int) {}
|
||||
|
||||
fun test() {
|
||||
foo(s = <caret>*intArrayOf(1))
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// "Surround with *arrayOf(...)" "true"
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
|
||||
fun foo(vararg s: String) {}
|
||||
|
||||
fun test() {
|
||||
foo(s = <caret>"value")
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Surround with *arrayOf(...)" "true"
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
|
||||
fun foo(vararg s: String) {}
|
||||
|
||||
fun test() {
|
||||
foo(s = *arrayOf("value"))
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Surround with *arrayOf(...)" "true"
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
|
||||
class Foo<T>(vararg val p: T)
|
||||
|
||||
fun test() {
|
||||
Foo(p = 123<caret>)
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Surround with *arrayOf(...)" "true"
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
|
||||
class Foo<T>(vararg val p: T)
|
||||
|
||||
fun test() {
|
||||
Foo(p = *arrayOf(123))
|
||||
}
|
||||
Reference in New Issue
Block a user