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
|
||||
}
|
||||
+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
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package
|
||||
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.3", message = "") public val valCur: kotlin.Unit
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", message = "") public val valNext: kotlin.Unit
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.3", message = "") public fun funCur(): kotlin.Unit
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", message = "") public fun funNext(): kotlin.Unit
|
||||
public fun usage(): kotlin.Unit
|
||||
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.3", message = "") public final class ClassCur {
|
||||
public constructor ClassCur()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.4", message = "") public final class ClassNext {
|
||||
public constructor ClassNext()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// !API_VERSION: 1.3
|
||||
|
||||
@DeprecatedSinceKotlin("", hiddenSince = "1.3")
|
||||
class ClassCur
|
||||
|
||||
@DeprecatedSinceKotlin("", hiddenSince = "1.3")
|
||||
fun funCur() {}
|
||||
|
||||
@DeprecatedSinceKotlin("", hiddenSince = "1.3")
|
||||
val valCur = Unit
|
||||
|
||||
@DeprecatedSinceKotlin("", hiddenSince = "1.4")
|
||||
class ClassNext
|
||||
|
||||
@DeprecatedSinceKotlin("", hiddenSince = "1.4")
|
||||
fun funNext() {}
|
||||
|
||||
@DeprecatedSinceKotlin("", hiddenSince = "1.4")
|
||||
val valNext = Unit
|
||||
|
||||
fun usage() {
|
||||
<!DEPRECATION_ERROR!>ClassCur<!>()
|
||||
<!UNRESOLVED_REFERENCE!>funCur<!>()
|
||||
<!UNRESOLVED_REFERENCE!>valCur<!>
|
||||
|
||||
ClassNext()
|
||||
funNext()
|
||||
valNext
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// !API_VERSION: 1.3
|
||||
|
||||
@DeprecatedSinceKotlin("", hiddenSince = "1.3")
|
||||
class ClassCur
|
||||
|
||||
@DeprecatedSinceKotlin("", hiddenSince = "1.3")
|
||||
fun funCur() {}
|
||||
|
||||
@DeprecatedSinceKotlin("", hiddenSince = "1.3")
|
||||
val valCur = Unit
|
||||
|
||||
@DeprecatedSinceKotlin("", hiddenSince = "1.4")
|
||||
class ClassNext
|
||||
|
||||
@DeprecatedSinceKotlin("", hiddenSince = "1.4")
|
||||
fun funNext() {}
|
||||
|
||||
@DeprecatedSinceKotlin("", hiddenSince = "1.4")
|
||||
val valNext = Unit
|
||||
|
||||
fun usage() {
|
||||
<!DEPRECATION_ERROR!>ClassCur<!>()
|
||||
<!UNRESOLVED_REFERENCE!>funCur<!>()
|
||||
<!UNRESOLVED_REFERENCE!>valCur<!>
|
||||
|
||||
ClassNext()
|
||||
funNext()
|
||||
valNext
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package
|
||||
|
||||
@kotlin.DeprecatedSinceKotlin(hiddenSince = "1.3", message = "") public val valCur: kotlin.Unit
|
||||
@kotlin.DeprecatedSinceKotlin(hiddenSince = "1.4", message = "") public val valNext: kotlin.Unit
|
||||
@kotlin.DeprecatedSinceKotlin(hiddenSince = "1.3", message = "") public fun funCur(): kotlin.Unit
|
||||
@kotlin.DeprecatedSinceKotlin(hiddenSince = "1.4", message = "") public fun funNext(): kotlin.Unit
|
||||
public fun usage(): kotlin.Unit
|
||||
|
||||
@kotlin.DeprecatedSinceKotlin(hiddenSince = "1.3", message = "") public final class ClassCur {
|
||||
public constructor ClassCur()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.DeprecatedSinceKotlin(hiddenSince = "1.4", message = "") public final class ClassNext {
|
||||
public constructor ClassNext()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// !API_VERSION: 1.3
|
||||
|
||||
@DeprecatedSinceKotlin("", warningSince = "1.3")
|
||||
class ClassCur
|
||||
|
||||
@DeprecatedSinceKotlin("", warningSince = "1.3")
|
||||
fun funCur() {}
|
||||
|
||||
@DeprecatedSinceKotlin("", warningSince = "1.3")
|
||||
val valCur = Unit
|
||||
|
||||
@DeprecatedSinceKotlin("", warningSince = "1.4")
|
||||
class ClassNext
|
||||
|
||||
@DeprecatedSinceKotlin("", warningSince = "1.4")
|
||||
fun funNext() {}
|
||||
|
||||
@DeprecatedSinceKotlin("", warningSince = "1.4")
|
||||
val valNext = Unit
|
||||
|
||||
fun usage() {
|
||||
<!DEPRECATION!>ClassCur<!>()
|
||||
<!DEPRECATION!>funCur<!>()
|
||||
<!DEPRECATION!>valCur<!>
|
||||
|
||||
ClassNext()
|
||||
funNext()
|
||||
valNext
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// !API_VERSION: 1.3
|
||||
|
||||
@DeprecatedSinceKotlin("", warningSince = "1.3")
|
||||
class ClassCur
|
||||
|
||||
@DeprecatedSinceKotlin("", warningSince = "1.3")
|
||||
fun funCur() {}
|
||||
|
||||
@DeprecatedSinceKotlin("", warningSince = "1.3")
|
||||
val valCur = Unit
|
||||
|
||||
@DeprecatedSinceKotlin("", warningSince = "1.4")
|
||||
class ClassNext
|
||||
|
||||
@DeprecatedSinceKotlin("", warningSince = "1.4")
|
||||
fun funNext() {}
|
||||
|
||||
@DeprecatedSinceKotlin("", warningSince = "1.4")
|
||||
val valNext = Unit
|
||||
|
||||
fun usage() {
|
||||
<!DEPRECATION!>ClassCur<!>()
|
||||
<!DEPRECATION!>funCur<!>()
|
||||
<!DEPRECATION!>valCur<!>
|
||||
|
||||
ClassNext()
|
||||
funNext()
|
||||
valNext
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package
|
||||
|
||||
@kotlin.DeprecatedSinceKotlin(message = "", warningSince = "1.3") public val valCur: kotlin.Unit
|
||||
@kotlin.DeprecatedSinceKotlin(message = "", warningSince = "1.4") public val valNext: kotlin.Unit
|
||||
@kotlin.DeprecatedSinceKotlin(message = "", warningSince = "1.3") public fun funCur(): kotlin.Unit
|
||||
@kotlin.DeprecatedSinceKotlin(message = "", warningSince = "1.4") public fun funNext(): kotlin.Unit
|
||||
public fun usage(): kotlin.Unit
|
||||
|
||||
@kotlin.DeprecatedSinceKotlin(message = "", warningSince = "1.3") public final class ClassCur {
|
||||
public constructor ClassCur()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.DeprecatedSinceKotlin(message = "", warningSince = "1.4") public final class ClassNext {
|
||||
public constructor ClassNext()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user