Files
kotlin-fork/compiler/testData/diagnostics/tests/deprecated/propertyUseSiteTargetedAnnotations.fir.kt
T
Andrey Zinovyev de3f31cf78 [FIR] Partial implementation of DEPRECATION(_ERROR) diagnostics
No support for inheritance deprecations
and deprecations in qualifier's parts
2021-07-07 16:19:28 +03:00

32 lines
652 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_EXPRESSION
class PropertyHolder {
@Deprecated("")
val a1 = 1
@property:Deprecated("")
var a2 = ""
@get:Deprecated("")
public val withGetter: String = ""
@set:Deprecated("")
public var withSetter: String = ""
}
fun fn() {
val holder = PropertyHolder()
holder.<!DEPRECATION!>a1<!>
holder.<!DEPRECATION!>a2<!>
holder.<!DEPRECATION!>withGetter<!>
holder.withSetter <!DEPRECATION!>=<!> "A"
}
fun literals() {
PropertyHolder::<!DEPRECATION!>a1<!>
PropertyHolder::<!DEPRECATION!>a2<!>
PropertyHolder::<!DEPRECATION!>withGetter<!>
PropertyHolder::withSetter
}