Mark with @DeprecatedSinceKotlin #KT-22423 and #KT-28753
This commit is contained in:
@@ -40,7 +40,8 @@ object Elements : TemplateGroupBase() {
|
||||
typeParam("@kotlin.internal.OnlyInputTypes T")
|
||||
if (f == ArraysOfPrimitives && primitive!!.isFloatingPoint()) {
|
||||
val replacement = "any { it == element }"
|
||||
deprecate(Deprecation(floatingSearchDeprecationMessage(signature, replacement), replacement, DeprecationLevel.WARNING))
|
||||
val message = floatingSearchDeprecationMessage(signature, replacement)
|
||||
deprecate(Deprecation(message, replacement, warningSince = "1.4"))
|
||||
annotation("""@Suppress("DEPRECATION")""")
|
||||
}
|
||||
returns("Boolean")
|
||||
@@ -68,7 +69,8 @@ object Elements : TemplateGroupBase() {
|
||||
}
|
||||
if (f == ArraysOfPrimitives && primitive!!.isFloatingPoint()) {
|
||||
val replacement = "indexOfFirst { it == element }"
|
||||
deprecate(Deprecation(floatingSearchDeprecationMessage(signature, replacement), replacement, DeprecationLevel.WARNING))
|
||||
val message = floatingSearchDeprecationMessage(signature, replacement)
|
||||
deprecate(Deprecation(message, replacement, warningSince = "1.4"))
|
||||
}
|
||||
returns("Int")
|
||||
body {
|
||||
@@ -132,7 +134,8 @@ object Elements : TemplateGroupBase() {
|
||||
}
|
||||
if (f == ArraysOfPrimitives && primitive!!.isFloatingPoint()) {
|
||||
val replacement = "indexOfLast { it == element }"
|
||||
deprecate(Deprecation(floatingSearchDeprecationMessage(signature, replacement), replacement, DeprecationLevel.WARNING))
|
||||
val message = floatingSearchDeprecationMessage(signature, replacement)
|
||||
deprecate(Deprecation(message, replacement, warningSince = "1.4"))
|
||||
}
|
||||
returns("Int")
|
||||
body {
|
||||
|
||||
@@ -159,7 +159,8 @@ object RangeOps : TemplateGroupBase() {
|
||||
|
||||
check(rangeType.isNumeric() == itemType.isNumeric()) { "Required rangeType and itemType both to be numeric or both not, got: $rangeType, $itemType" }
|
||||
if (rangeType.isIntegral() != itemType.isIntegral()) {
|
||||
deprecate(Deprecation("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR))
|
||||
val message = "This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed."
|
||||
deprecate(Deprecation(message, warningSince = "1.3", errorSince = "1.4"))
|
||||
}
|
||||
|
||||
platformName("${rangeType.name.decapitalize()}RangeContains")
|
||||
|
||||
Reference in New Issue
Block a user