Function expressions can be now annotated with expression-targeted annotation #KT-9323 Fixed
This commit is contained in:
+11
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user