Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/kt1860-positive.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

13 lines
394 B
Kotlin
Vendored

target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION)
annotation class test
fun foo(test <!UNUSED_PARAMETER!>f<!> : Int) {}
var bar : Int = 1
set(test v) {}
val x : (Int) -> Int = {@test <!TYPE_MISMATCH!>x<!> <!DEPRECATED_STATIC_ASSERT!>: Int<!> <!SYNTAX!>-> x<!>} // todo fix parser annotation on lambda parameter
class Hello(test <!UNUSED_PARAMETER!>args<!>: Any) {
}