Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.kt
T
Denis Zharkov 4c69416f2b Report warning on unused entities that can be renamed to _
Currently it's all about lambda parameters/destructuring entries

 #KT-14347 In Progress
2016-10-24 10:19:25 +03:00

15 lines
409 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)<!> (<!UNUSED_VARIABLE!>x<!>, @Ann(4) <!UNUSED_VARIABLE!>y<!>) in bar()) {}
for (@<!UNRESOLVED_REFERENCE!>Err<!>() (<!UNUSED_VARIABLE!>x<!>,<!UNUSED_VARIABLE!>y<!>) in bar()) {}
}