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
@@ -1,6 +1,8 @@
annotation class base
@Target(AnnotationTarget.EXPRESSION) annotation class special
@Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class special
fun transform(i: Int, tr: (Int) -> Int): Int = <!WRONG_ANNOTATION_TARGET!>@base<!> @special tr(@special i)