Extra annotation target test for prefix expression

This commit is contained in:
Mikhail Glukhikh
2015-09-25 12:22:02 +03:00
parent f06a79d534
commit 74ba21b40c
3 changed files with 35 additions and 0 deletions
@@ -0,0 +1,12 @@
@Target(AnnotationTarget.FUNCTION)
annotation class FunAnn
@Target(AnnotationTarget.EXPRESSION)
annotation class ExprAnn
fun foo(): Int {
var x = 5
<!WRONG_ANNOTATION_TARGET!>@FunAnn<!> ++x
@ExprAnn ++x
return x
}