Do not put inapplicable annotations on getter

This commit is contained in:
Yan Zhulanow
2015-10-08 19:41:08 +03:00
parent 9ae3b0fa9c
commit 9699708fb8
4 changed files with 32 additions and 4 deletions
@@ -24,4 +24,15 @@ public class A(
@AnnProperty @AnnField @AnnFieldProperty @AnnParameterProperty @AnnParameterField @AnnTypeField
public val a: Int = 1
}
}
@Target(AnnotationTarget.FIELD)
annotation class Anno
@Anno
val p: Int
get() = 5
@Anno
val p2: Int = 4
get() = field