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
This commit is contained in:
Alexander Udalov
2016-10-07 15:07:48 +03:00
parent 6e0e8c6dc3
commit 83c86d06ed
5 changed files with 67 additions and 10 deletions
@@ -131,5 +131,5 @@ fun use(
ned.p = 1
diff.<!DEPRECATION!>p<!>
diff.<!DEPRECATION, DEPRECATION!>p<!> = 1
diff.<!DEPRECATION, DEPRECATION_ERROR!>p<!> = 1
}
@@ -0,0 +1,40 @@
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<!> = ""
}
@@ -0,0 +1,9 @@
package
public val v1: kotlin.String
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "") public val v2: kotlin.String = ""
public var v3: kotlin.String
public var v4: kotlin.String
public var v5: kotlin.String
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "") public var v6: kotlin.String
public fun test(): kotlin.Unit