Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.kt
T
2015-09-07 13:42:26 +03:00

20 lines
355 B
Kotlin
Vendored

@Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
@Repeatable
annotation class Ann(val x: Int = 1)
inline fun bar(block: () -> Int): Int = block()
fun foo() {
bar() @Ann(1) @Ann(2) { 101 }
bar() @Ann(3) { 102 }
bar @Ann l1@ {
return@l1 103
}
bar @Ann(<!TYPE_MISMATCH!>""<!>) {
104
}
}