Introduce error "ANNOTATION_USED_AS_ANNOTATION_ARGUMENT" along with QF
The relevant inspection has been removed So #KT-18855 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
b81ca31aae
commit
68659f5a32
@@ -0,0 +1,9 @@
|
||||
// "Remove @ from annotation argument" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
annotation class Y()
|
||||
annotation class X(val value: Array<Y>)
|
||||
|
||||
@X(arrayOf(Y(), @Y()<caret>))
|
||||
fun foo() {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove @ from annotation argument" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
annotation class Y()
|
||||
annotation class X(val value: Array<Y>)
|
||||
|
||||
@X(arrayOf(Y(), Y()))
|
||||
fun foo() {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Remove @ from annotation argument" "true"
|
||||
// ERROR: An annotation parameter must be a compile-time constant
|
||||
|
||||
annotation class Y()
|
||||
annotation class X(val value: Y, val y: Y)
|
||||
|
||||
@X(Y(), y = @Y()<caret>)
|
||||
fun foo() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Remove @ from annotation argument" "true"
|
||||
// ERROR: An annotation parameter must be a compile-time constant
|
||||
|
||||
annotation class Y()
|
||||
annotation class X(val value: Y, val y: Y)
|
||||
|
||||
@X(Y(), y = Y())
|
||||
fun foo() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove @ from annotation argument" "true"
|
||||
// ERROR: An annotation parameter must be a compile-time constant
|
||||
|
||||
annotation class Y()
|
||||
annotation class X(val value: Y)
|
||||
|
||||
@X(@Y()<caret>)
|
||||
fun foo() {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove @ from annotation argument" "true"
|
||||
// ERROR: An annotation parameter must be a compile-time constant
|
||||
|
||||
annotation class Y()
|
||||
annotation class X(val value: Y)
|
||||
|
||||
@X(Y())
|
||||
fun foo() {
|
||||
}
|
||||
Reference in New Issue
Block a user