Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/rendering/unusedValue.kt
T

13 lines
353 B
Kotlin
Vendored

// !RENDER_DIAGNOSTICS_MESSAGES
// !DIAGNOSTICS: -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE +UNUSED_VALUE
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION, AnnotationTarget.TYPE, AnnotationTarget.LOCAL_VARIABLE)
annotation class A
@A
fun test() {
@A
var b: @A Int = 0
<!UNUSED_VALUE("15; var b: Int defined in test")!>b =<!> 15
}