Files
kotlin/compiler/testData/diagnostics/tests/annotations/options/functionExpression.kt
2018-07-18 14:21:03 +03:00

12 lines
266 B
Kotlin
Vendored

@Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
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()
}