Advance deprecation level of Float/DoubleArray contains, indexOf, lastIndexOf to ERROR #KT-28753

This commit is contained in:
Abduqodiri Qurbonzoda
2021-09-13 17:32:17 +03:00
parent 3ddc29363a
commit bde055fe5c
5 changed files with 25 additions and 25 deletions
@@ -43,8 +43,8 @@ object Elements : TemplateGroupBase() {
if (f == ArraysOfPrimitives && primitive!!.isFloatingPoint()) {
val replacement = "any { it == element }"
val message = floatingSearchDeprecationMessage(signature, replacement)
deprecate(Deprecation(message, replacement, warningSince = "1.4"))
annotation("""@Suppress("DEPRECATION")""")
deprecate(Deprecation(message, replacement, warningSince = "1.4", errorSince = "1.6"))
annotation("""@Suppress("DEPRECATION_ERROR")""")
}
returns("Boolean")
body(Iterables) {
@@ -72,7 +72,7 @@ object Elements : TemplateGroupBase() {
if (f == ArraysOfPrimitives && primitive!!.isFloatingPoint()) {
val replacement = "indexOfFirst { it == element }"
val message = floatingSearchDeprecationMessage(signature, replacement)
deprecate(Deprecation(message, replacement, warningSince = "1.4"))
deprecate(Deprecation(message, replacement, warningSince = "1.4", errorSince = "1.6"))
}
returns("Int")
body {
@@ -137,7 +137,7 @@ object Elements : TemplateGroupBase() {
if (f == ArraysOfPrimitives && primitive!!.isFloatingPoint()) {
val replacement = "indexOfLast { it == element }"
val message = floatingSearchDeprecationMessage(signature, replacement)
deprecate(Deprecation(message, replacement, warningSince = "1.4"))
deprecate(Deprecation(message, replacement, warningSince = "1.4", errorSince = "1.6"))
}
returns("Int")
body {