Restrict retention for annotations with target EXPRESSION

#KT-13762 Fixed
This commit is contained in:
Dmitry Petrov
2018-07-16 18:43:04 +03:00
parent 70eaa0ec75
commit 5767f84c0e
48 changed files with 210 additions and 25 deletions
@@ -6,11 +6,11 @@ package foo
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION)
annotation class AnnotationWithSourceRetention
@Retention(AnnotationRetention.BINARY)
<!RESTRICTED_RETENTION_FOR_EXPRESSION_ANNOTATION_WARNING!>@Retention(AnnotationRetention.BINARY)<!>
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION)
annotation class AnnotationWithBinaryRetention
@Retention(AnnotationRetention.RUNTIME)
<!RESTRICTED_RETENTION_FOR_EXPRESSION_ANNOTATION_WARNING!>@Retention(AnnotationRetention.RUNTIME)<!>
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION)
annotation class AnnotationWithRuntimeRetention