diff --git a/runtime/src/main/kotlin/kotlin/Primitives.kt b/runtime/src/main/kotlin/kotlin/Primitives.kt index 9fd019ac754..0b29897deee 100644 --- a/runtime/src/main/kotlin/kotlin/Primitives.kt +++ b/runtime/src/main/kotlin/kotlin/Primitives.kt @@ -1333,6 +1333,7 @@ public final class Float private constructor() : Number(), Comparable { * * The resulting `Byte` value is equal to `this.toInt().toByte()`. */ + @Deprecated("Unclear conversion. To achieve the same result convert to Int explicitly and then to Byte.", ReplaceWith("toInt().toByte()")) public override fun toByte(): Byte = this.toInt().toByte() /** @@ -1347,6 +1348,7 @@ public final class Float private constructor() : Number(), Comparable { * * The resulting `Short` value is equal to `this.toInt().toShort()`. */ + @Deprecated("Unclear conversion. To achieve the same result convert to Int explicitly and then to Short.", ReplaceWith("toInt().toShort()")) public override fun toShort(): Short = this.toInt().toShort() /** @@ -1592,6 +1594,7 @@ public final class Double private constructor() : Number(), Comparable { * * The resulting `Byte` value is equal to `this.toInt().toByte()`. */ + @Deprecated("Unclear conversion. To achieve the same result convert to Int explicitly and then to Byte.", ReplaceWith("toInt().toByte()")) public override fun toByte(): Byte = this.toInt().toByte() /** @@ -1606,6 +1609,7 @@ public final class Double private constructor() : Number(), Comparable { * * The resulting `Short` value is equal to `this.toInt().toShort()`. */ + @Deprecated("Unclear conversion. To achieve the same result convert to Int explicitly and then to Short.", ReplaceWith("toInt().toShort()")) public override fun toShort(): Short = this.toInt().toShort() /**