Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/rendering/unusedValue.kt
T
Pavel Kirpichenkov b7e5d9faae Update annotation rendering in diagnostics
Disable annotation rendering in default type and descriptor renderers.
Preserve annotations in Android and Serialization plugins.
Update error texts in ide tests.
Nullability annotations in Java descriptors are rendered with context-dependent renderer.

#KT-20258 Fixed
2019-10-04 11:18:45 +03:00

13 lines
341 B
Kotlin
Vendored

// !RENDER_DIAGNOSTICS_MESSAGES
// !DIAGNOSTICS: -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE
@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
}