Implement inspection to remove @ from annotation argument #KT-9228 Fixed
(cherry picked from commit 543c6bc)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
c80e094967
commit
113ab7640e
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.intentions.RemoveAtFromAnnotationArgumentIntention
|
||||
@@ -0,0 +1,8 @@
|
||||
// INTENTION_TEXT: Remove @ from annotation argument
|
||||
|
||||
annotation class X(val value: Y)
|
||||
annotation class Y()
|
||||
|
||||
@X(@Y()<caret>)
|
||||
fun foo() {
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// INTENTION_TEXT: Remove @ from annotation argument
|
||||
|
||||
annotation class X(val value: Y)
|
||||
annotation class Y()
|
||||
|
||||
@X(Y())
|
||||
fun foo() {
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: Remove @ from annotation argument
|
||||
|
||||
annotation class X(val value: Array<Y>)
|
||||
annotation class Y()
|
||||
|
||||
@X(arrayOf(Y(), @Y()<caret>))
|
||||
fun foo() {
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: Remove @ from annotation argument
|
||||
|
||||
annotation class X(val value: Array<Y>)
|
||||
annotation class Y()
|
||||
|
||||
@X(arrayOf(Y(), Y()))
|
||||
fun foo() {
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// INTENTION_TEXT: Remove @ from annotation argument
|
||||
|
||||
annotation class X(val value: Y, val y: Y)
|
||||
annotation class Y()
|
||||
|
||||
@X(@Y(), y = @Y()<caret>)
|
||||
fun foo() {
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// INTENTION_TEXT: Remove @ from annotation argument
|
||||
|
||||
annotation class X(val value: Y, val y: Y)
|
||||
annotation class Y()
|
||||
|
||||
@X(@Y(), y = Y())
|
||||
fun foo() {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
annotation class X(val s: String)
|
||||
|
||||
@X("@@@"<caret>)
|
||||
fun foo() {
|
||||
}
|
||||
Reference in New Issue
Block a user