Specify DeprecatedSinceKotlin for recently deprecated min/max funs

#KT-38854
This commit is contained in:
Ilya Gorbunov
2020-07-16 06:19:43 +03:00
parent a9f4479557
commit 87cb6372a0
13 changed files with 333 additions and 3 deletions
@@ -324,7 +324,7 @@ object Aggregates : TemplateGroupBase() {
val isFloat = primitive?.isFloatingPoint() == true
if (!nullable) {
deprecate(Deprecation("Use ${op}OrNull instead.", "${op}OrNull()", DeprecationLevel.WARNING))
deprecate(Deprecation("Use ${op}OrNull instead.", "${op}OrNull()", DeprecationLevel.WARNING, warningSince = "1.4"))
val isGeneric = f in listOf(Iterables, Sequences, ArraysOfObjects)
if (isFloat && isGeneric) {
@@ -391,7 +391,7 @@ object Aggregates : TemplateGroupBase() {
returns("T?")
if (!nullable) {
deprecate(Deprecation("Use ${op}OrNull instead.", "${op}OrNull(selector)", DeprecationLevel.WARNING))
deprecate(Deprecation("Use ${op}OrNull instead.", "${op}OrNull(selector)", DeprecationLevel.WARNING, warningSince = "1.4"))
body { "return ${op}OrNull(selector)" }
return@builder
}
@@ -458,7 +458,7 @@ object Aggregates : TemplateGroupBase() {
returns("T?")
if (!nullable) {
deprecate(Deprecation("Use ${op}OrNull instead.", "${op}OrNull(comparator)", DeprecationLevel.WARNING))
deprecate(Deprecation("Use ${op}OrNull instead.", "${op}OrNull(comparator)", DeprecationLevel.WARNING, warningSince = "1.4"))
body { "return ${op}OrNull(comparator)" }
return@builder
}