Files
kotlin-fork/compiler/testData/diagnostics/tests/deprecated/hiddenPropertyAccessors.kt
T
Alexander Udalov 83c86d06ed Report error instead of warning for deprecation level HIDDEN
Since functions usually are hidden from resolution when they are
deprecated-hidden, the problem can only be reproduced for properties with
deprecated-hidden accessors, where DeprecatedCallChecker reported warnings
instead of errors
2016-10-11 17:30:13 +03:00

41 lines
909 B
Kotlin
Vendored

val v1: String
@Deprecated("", level = DeprecationLevel.HIDDEN)
get() = ""
@Deprecated("", level = DeprecationLevel.HIDDEN)
val v2 = ""
var v3: String
@Deprecated("", level = DeprecationLevel.HIDDEN)
get() = ""
set(value) {}
var v4: String
get() = ""
@Deprecated("", level = DeprecationLevel.HIDDEN)
set(value) {}
var v5: String
@Deprecated("", level = DeprecationLevel.HIDDEN)
get() = ""
@Deprecated("", level = DeprecationLevel.HIDDEN)
set(value) {}
@Deprecated("", level = DeprecationLevel.HIDDEN)
var v6: String
get() = ""
set(value) {}
fun test() {
<!DEPRECATION_ERROR!>v1<!>
<!UNRESOLVED_REFERENCE!>v2<!>
<!DEPRECATION_ERROR!>v3<!>
v3 = ""
v4
<!DEPRECATION_ERROR!>v4<!> = ""
<!DEPRECATION_ERROR!>v5<!>
<!DEPRECATION_ERROR!>v5<!> = ""
<!UNRESOLVED_REFERENCE!>v6<!>
<!UNRESOLVED_REFERENCE!>v6<!> = ""
}