Introduce DeprecatedSinceKotlin annotation
This annotation will be used in the standard library to prevent the new compiler from reporting deprecation diagnostics in case an older API version is used (where the declaration was not deprecated yet). #KT-23575 Fixed
This commit is contained in:
committed by
Mikhail Zarechenskiy
parent
b2022144e6
commit
0aaf29c045
+29
@@ -0,0 +1,29 @@
|
||||
// !API_VERSION: 1.3
|
||||
|
||||
@DeprecatedSinceKotlin("", errorSince = "1.3")
|
||||
class ClassCur
|
||||
|
||||
@DeprecatedSinceKotlin("", errorSince = "1.3")
|
||||
fun funCur() {}
|
||||
|
||||
@DeprecatedSinceKotlin("", errorSince = "1.3")
|
||||
val valCur = Unit
|
||||
|
||||
@DeprecatedSinceKotlin("", errorSince = "1.4")
|
||||
class ClassNext
|
||||
|
||||
@DeprecatedSinceKotlin("", errorSince = "1.4")
|
||||
fun funNext() {}
|
||||
|
||||
@DeprecatedSinceKotlin("", errorSince = "1.4")
|
||||
val valNext = Unit
|
||||
|
||||
fun usage() {
|
||||
<!DEPRECATION_ERROR!>ClassCur<!>()
|
||||
<!DEPRECATION_ERROR!>funCur<!>()
|
||||
<!DEPRECATION_ERROR!>valCur<!>
|
||||
|
||||
ClassNext()
|
||||
funNext()
|
||||
valNext
|
||||
}
|
||||
Reference in New Issue
Block a user