Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.kt
T
Mikhail Glukhikh 0d2a81f098 Annotation target checking in front-end, a set of tests for different annotation targets, existing test fixes
No checks for erroneous annotations. Additional checks for identifiers.
2015-07-14 16:25:04 +03:00

18 lines
322 B
Kotlin
Vendored

target(AnnotationTarget.EXPRESSION)
annotation(repeatable = true) 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
}
}