Files
kotlin/compiler/testData/diagnostics/tests/annotations/options/functionExpression.kt

11 lines
227 B
Kotlin
Vendored

@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()
}