From 93833f7db21698243d95c9fc0404a84173b26332 Mon Sep 17 00:00:00 2001 From: Abduqodiri Qurbonzoda Date: Thu, 16 Sep 2021 21:54:25 +0300 Subject: [PATCH] Advance K/N StringBuilder.appendln() deprecation level to ERROR #KT-38754 --- .../tests/runtime/text/string_builder1.kt | 2 +- .../kotlin/kotlin/text/StringBuilderNative.kt | 30 ++++++++++++------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/kotlin-native/backend.native/tests/runtime/text/string_builder1.kt b/kotlin-native/backend.native/tests/runtime/text/string_builder1.kt index bd783f99441..3b3681f5f14 100644 --- a/kotlin-native/backend.native/tests/runtime/text/string_builder1.kt +++ b/kotlin-native/backend.native/tests/runtime/text/string_builder1.kt @@ -9,6 +9,6 @@ import kotlin.test.* @Test fun runTest() { val a = StringBuilder() - a.append("Hello").appendln("Kotlin").appendln(42).appendln(0.1).appendln(true) + a.append("Hello").appendLine("Kotlin").appendLine(42).appendLine(0.1).appendLine(true) println(a.toString()) } diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/text/StringBuilderNative.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/text/StringBuilderNative.kt index f73b1c2f7f9..1a6b994e248 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/text/StringBuilderNative.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/text/StringBuilderNative.kt @@ -36,32 +36,42 @@ public inline fun StringBuilder.appendLine(value: Float): StringBuilder = append public inline fun StringBuilder.appendLine(value: Double): StringBuilder = append(value).appendLine() -@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)"), level = DeprecationLevel.WARNING) +@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.6") +@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)")) public fun StringBuilder.appendln(it: String): StringBuilder = appendLine(it) -@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)"), level = DeprecationLevel.WARNING) +@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.6") +@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)")) public fun StringBuilder.appendln(it: Boolean): StringBuilder = appendLine(it) -@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)"), level = DeprecationLevel.WARNING) +@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.6") +@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)")) public fun StringBuilder.appendln(it: Byte): StringBuilder = appendLine(it) -@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)"), level = DeprecationLevel.WARNING) +@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.6") +@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)")) public fun StringBuilder.appendln(it: Short): StringBuilder = appendLine(it) -@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)"), level = DeprecationLevel.WARNING) +@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.6") +@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)")) public fun StringBuilder.appendln(it: Int): StringBuilder = appendLine(it) -@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)"), level = DeprecationLevel.WARNING) +@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.6") +@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)")) public fun StringBuilder.appendln(it: Long): StringBuilder = appendLine(it) -@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)"), level = DeprecationLevel.WARNING) +@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.6") +@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)")) public fun StringBuilder.appendln(it: Float): StringBuilder = appendLine(it) -@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)"), level = DeprecationLevel.WARNING) +@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.6") +@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)")) public fun StringBuilder.appendln(it: Double): StringBuilder = appendLine(it) -@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)"), level = DeprecationLevel.WARNING) +@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.6") +@Deprecated("Use appendLine instead", ReplaceWith("appendLine(it)")) public fun StringBuilder.appendln(it: Any?): StringBuilder = appendLine(it) -@Deprecated("Use appendLine instead", ReplaceWith("appendLine()"), level = DeprecationLevel.WARNING) +@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.6") +@Deprecated("Use appendLine instead", ReplaceWith("appendLine()")) public fun StringBuilder.appendln(): StringBuilder = appendLine() \ No newline at end of file