CFG: mark annotation arguments as "used as expressions" #KT-24596 Fixed
NB: only classes / function / properties annotations are considered here, not including local declarations and other annotations
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
annotation class InAnn(val value: String)
|
||||
|
||||
@InAnn("Tagged") class AnnHolder
|
||||
|
||||
@InAnn(value = "Tagged") class AnotherAnnHolder
|
||||
|
||||
@InAnn("This is Tagged") class ComplexAnnHolder {
|
||||
@InAnn("That is Tagged") fun foo() {}
|
||||
}
|
||||
|
||||
@InAnn("This is also Tagged") fun bar() {}
|
||||
|
||||
fun baz(@InAnn("This is ${} too") x: Int) {}
|
||||
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class ExprAnn(val value: String)
|
||||
|
||||
val inProperty = "Tagged"
|
||||
|
||||
fun foo() {
|
||||
val x = @ExprAnn() inProperty
|
||||
}
|
||||
Reference in New Issue
Block a user