Function expressions can be now annotated with expression-targeted annotation #KT-9323 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-09-28 13:49:23 +03:00
parent 4e91f2ffb7
commit f4ccb16c2e
6 changed files with 46 additions and 8 deletions
@@ -0,0 +1,11 @@
@Target(AnnotationTarget.EXPRESSION)
annotation class ExprAnn
@Target(AnnotationTarget.FUNCTION)
annotation class FunAnn
fun foo(): Int {
val x = @ExprAnn fun() = 1
val y = @FunAnn fun() = 2
return x() + y()
}