FIR: add check of SOURCE retention for EXPRESSION-targeted annotation

This commit is contained in:
Mikhail Glukhikh
2021-05-13 11:22:04 +03:00
parent 4b00a43b22
commit 92ab600081
12 changed files with 210 additions and 77 deletions
@@ -1,13 +0,0 @@
// !LANGUAGE: +RestrictRetentionForExpressionAnnotations
@Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class TestRetentionSource
@Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.BINARY)
annotation class TestRetentionBinary
@Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.RUNTIME)
annotation class TestRetentionRuntime
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +RestrictRetentionForExpressionAnnotations
@Target(AnnotationTarget.EXPRESSION)
@@ -5,9 +5,9 @@
annotation class TestRetentionSource
@Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.BINARY)
<!RESTRICTED_RETENTION_FOR_EXPRESSION_ANNOTATION!>@Retention(AnnotationRetention.BINARY)<!>
annotation class TestRetentionBinary
@Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.RUNTIME)
<!RESTRICTED_RETENTION_FOR_EXPRESSION_ANNOTATION!>@Retention(AnnotationRetention.RUNTIME)<!>
annotation class TestRetentionRuntime