Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.kt
T
2015-09-18 10:14:32 +03:00

14 lines
343 B
Kotlin
Vendored

annotation class Ann(val x: Int)
data class A(val x: Int, val y: Int)
fun bar(): Array<A> = null!!
fun foo() {
for (@Ann(1) i in 1..100) {}
for (@Ann(2) i in 1..100) {}
for (<!WRONG_ANNOTATION_TARGET!>@Ann(3)<!> (x, @Ann(4) y) in bar()) {}
for (<!UNRESOLVED_REFERENCE, WRONG_ANNOTATION_TARGET!>@Err<!> (x,y) in bar()) {}
}