Implement inspection to remove @ from annotation argument #KT-9228 Fixed

(cherry picked from commit 543c6bc)
This commit is contained in:
shiraji
2016-07-08 23:44:55 +03:00
committed by Mikhail Glukhikh
parent c80e094967
commit 113ab7640e
15 changed files with 169 additions and 0 deletions
@@ -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() {
}
@@ -0,0 +1,8 @@
// INTENTION_TEXT: Remove @ from annotation argument
annotation class X(val value: Y)
annotation class Y()
@X(Y())
fun foo() {
}
@@ -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() {
}
@@ -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() {
}
@@ -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() {
}
@@ -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() {
}