Implement quick fix for "Invalid type of annotation member"

Quickfix changes array of boxed type to array of primitive type

#KT-8568 Fixed
This commit is contained in:
Vyacheslav Gerasimov
2017-03-14 16:56:37 +03:00
parent b8563f7fcf
commit 087551ad61
19 changed files with 231 additions and 0 deletions
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val boo: <caret>Array<Boolean>,
val str: Array<String>
)
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val boo: BooleanArray,
val str: Array<String>
)
+5
View File
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val b: <caret>Array<Byte>,
val str: Array<String>
)
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val b: ByteArray,
val str: Array<String>
)
+5
View File
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val c: <caret>Array<Char>,
val str: Array<String>
)
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val c: CharArray,
val str: Array<String>
)
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val f: <caret>Array<Float>,
val str: Array<String>
)
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val f: FloatArray,
val str: Array<String>
)
+5
View File
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val i: <caret>Array<Int>,
val str: Array<String>
)
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val i: IntArray,
val str: Array<String>
)
+5
View File
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val l: <caret>Array<Long>,
val str: Array<String>
)
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val l: LongArray,
val str: Array<String>
)
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val s: <caret>Array<Short>,
val str: Array<String>
)
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "true"
annotation class SuperAnnotation(
val s: ShortArray,
val str: Array<String>
)
+7
View File
@@ -0,0 +1,7 @@
// "Replace array of boxed with array of primitive" "false"
// ACTION: Convert to secondary constructor
// ERROR: Invalid type of annotation member
annotation class SuperAnnotation(
val foo: <caret>Array<*>,
val str: Array<String>
)
@@ -0,0 +1,5 @@
// "Replace array of boxed with array of primitive" "false"
// ACTION: Convert to secondary constructor
annotation class SuperAnnotation(
val str: <caret>Array<String>
)