Deprecate Char-to-Number conversions in stdlib (JVM and JS)

- Int.toChar was left non-deprecated because the replacement is not intrinsic yet.
- Number.toChar was left non-deprecated because otherwise the deprecation propagates to the override, Int.toChar.

KT-23451
This commit is contained in:
Ilya Gorbunov
2021-04-06 15:36:44 +03:00
parent b976cd812a
commit b64b96eee6
59 changed files with 273 additions and 169 deletions
+11 -11
View File
@@ -100,7 +100,7 @@ public final class Byte : kotlin.Number, kotlin.Comparable<kotlin.Byte> {
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -141,13 +141,13 @@ public final class Char : kotlin.Comparable<kotlin.Char> {
public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char
public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char
public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange
public final fun toByte(): kotlin.Byte
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toByte(): kotlin.Byte
public final fun toChar(): kotlin.Char
public final fun toDouble(): kotlin.Double
public final fun toFloat(): kotlin.Float
public final fun toInt(): kotlin.Int
public final fun toLong(): kotlin.Long
public final fun toShort(): kotlin.Short
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toDouble()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toDouble(): kotlin.Double
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toFloat()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toFloat(): kotlin.Float
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toInt(): kotlin.Int
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toLong()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toLong(): kotlin.Long
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toShort()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toShort(): kotlin.Short
public companion object Companion {
/*primary*/ private constructor Companion()
@@ -276,7 +276,7 @@ public final class Double : kotlin.Number, kotlin.Comparable<kotlin.Double> {
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Double
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Double
@kotlin.Deprecated(message = "Unclear conversion. To achieve the same result convert to Int explicitly and then to Byte.", replaceWith = kotlin.ReplaceWith(expression = "toInt().toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3") public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -377,7 +377,7 @@ public final class Float : kotlin.Number, kotlin.Comparable<kotlin.Float> {
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Float
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Float
@kotlin.Deprecated(message = "Unclear conversion. To achieve the same result convert to Int explicitly and then to Byte.", replaceWith = kotlin.ReplaceWith(expression = "toInt().toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3") public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -552,7 +552,7 @@ public final class Long : kotlin.Number, kotlin.Comparable<kotlin.Long> {
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Long
public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -664,7 +664,7 @@ public final class Short : kotlin.Number, kotlin.Comparable<kotlin.Short> {
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
+11 -11
View File
@@ -102,7 +102,7 @@ public final class Byte : kotlin.Number, kotlin.Comparable<kotlin.Byte>, java.io
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -144,13 +144,13 @@ public final class Char : kotlin.Comparable<kotlin.Char>, java.io.Serializable {
public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char
public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char
public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange
public final fun toByte(): kotlin.Byte
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toByte(): kotlin.Byte
public final fun toChar(): kotlin.Char
public final fun toDouble(): kotlin.Double
public final fun toFloat(): kotlin.Float
public final fun toInt(): kotlin.Int
public final fun toLong(): kotlin.Long
public final fun toShort(): kotlin.Short
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toDouble()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toDouble(): kotlin.Double
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toFloat()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toFloat(): kotlin.Float
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toInt(): kotlin.Int
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toLong()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toLong(): kotlin.Long
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toShort()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toShort(): kotlin.Short
public companion object Companion {
/*primary*/ private constructor Companion()
@@ -286,7 +286,7 @@ public final class Double : kotlin.Number, kotlin.Comparable<kotlin.Double>, jav
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Double
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Double
@kotlin.Deprecated(message = "Unclear conversion. To achieve the same result convert to Int explicitly and then to Byte.", replaceWith = kotlin.ReplaceWith(expression = "toInt().toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3") public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -390,7 +390,7 @@ public final class Float : kotlin.Number, kotlin.Comparable<kotlin.Float>, java.
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Float
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Float
@kotlin.Deprecated(message = "Unclear conversion. To achieve the same result convert to Int explicitly and then to Byte.", replaceWith = kotlin.ReplaceWith(expression = "toInt().toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3") public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -567,7 +567,7 @@ public final class Long : kotlin.Number, kotlin.Comparable<kotlin.Long>, java.io
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Long
public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -680,7 +680,7 @@ public final class Short : kotlin.Number, kotlin.Comparable<kotlin.Short>, java.
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
+11 -11
View File
@@ -102,7 +102,7 @@ public final class Byte : kotlin.Number, kotlin.Comparable<kotlin.Byte>, java.io
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -144,13 +144,13 @@ public final class Char : kotlin.Comparable<kotlin.Char>, java.io.Serializable {
public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char
public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char
public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange
public final fun toByte(): kotlin.Byte
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toByte(): kotlin.Byte
public final fun toChar(): kotlin.Char
public final fun toDouble(): kotlin.Double
public final fun toFloat(): kotlin.Float
public final fun toInt(): kotlin.Int
public final fun toLong(): kotlin.Long
public final fun toShort(): kotlin.Short
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toDouble()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toDouble(): kotlin.Double
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toFloat()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toFloat(): kotlin.Float
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toInt(): kotlin.Int
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toLong()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toLong(): kotlin.Long
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toShort()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toShort(): kotlin.Short
public companion object Companion {
/*primary*/ private constructor Companion()
@@ -288,7 +288,7 @@ public final class Double : kotlin.Number, kotlin.Comparable<kotlin.Double>, jav
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Double
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Double
@kotlin.Deprecated(message = "Unclear conversion. To achieve the same result convert to Int explicitly and then to Byte.", replaceWith = kotlin.ReplaceWith(expression = "toInt().toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3") public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -392,7 +392,7 @@ public final class Float : kotlin.Number, kotlin.Comparable<kotlin.Float>, java.
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Float
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Float
@kotlin.Deprecated(message = "Unclear conversion. To achieve the same result convert to Int explicitly and then to Byte.", replaceWith = kotlin.ReplaceWith(expression = "toInt().toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3") public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -569,7 +569,7 @@ public final class Long : kotlin.Number, kotlin.Comparable<kotlin.Long>, java.io
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Long
public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -682,7 +682,7 @@ public final class Short : kotlin.Number, kotlin.Comparable<kotlin.Short>, java.
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
+11 -11
View File
@@ -102,7 +102,7 @@ public final class Byte : kotlin.Number, kotlin.Comparable<kotlin.Byte>, java.io
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -144,13 +144,13 @@ public final class Char : kotlin.Comparable<kotlin.Char>, java.io.Serializable {
public final operator fun minus(/*0*/ other: kotlin.Int): kotlin.Char
public final operator fun plus(/*0*/ other: kotlin.Int): kotlin.Char
public final operator fun rangeTo(/*0*/ other: kotlin.Char): kotlin.ranges.CharRange
public final fun toByte(): kotlin.Byte
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toByte(): kotlin.Byte
public final fun toChar(): kotlin.Char
public final fun toDouble(): kotlin.Double
public final fun toFloat(): kotlin.Float
public final fun toInt(): kotlin.Int
public final fun toLong(): kotlin.Long
public final fun toShort(): kotlin.Short
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toDouble()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toDouble(): kotlin.Double
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toFloat()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toFloat(): kotlin.Float
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toInt(): kotlin.Int
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toLong()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toLong(): kotlin.Long
@kotlin.Deprecated(message = "Conversion of Char to Number is deprecated. Use Char.code property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.code.toShort()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public final fun toShort(): kotlin.Short
public companion object Companion {
/*primary*/ private constructor Companion()
@@ -286,7 +286,7 @@ public final class Double : kotlin.Number, kotlin.Comparable<kotlin.Double>, jav
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Double
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Double
@kotlin.Deprecated(message = "Unclear conversion. To achieve the same result convert to Int explicitly and then to Byte.", replaceWith = kotlin.ReplaceWith(expression = "toInt().toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3") public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -390,7 +390,7 @@ public final class Float : kotlin.Number, kotlin.Comparable<kotlin.Float>, java.
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Float
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Float
@kotlin.Deprecated(message = "Unclear conversion. To achieve the same result convert to Int explicitly and then to Byte.", replaceWith = kotlin.ReplaceWith(expression = "toInt().toByte()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3") public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -567,7 +567,7 @@ public final class Long : kotlin.Number, kotlin.Comparable<kotlin.Long>, java.io
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Long
public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -680,7 +680,7 @@ public final class Short : kotlin.Number, kotlin.Comparable<kotlin.Short>, java.
public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
public open override /*1*/ fun toByte(): kotlin.Byte
public open override /*1*/ fun toChar(): kotlin.Char
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(warningSince = "1.5") public open override /*1*/ fun toChar(): kotlin.Char
public open override /*1*/ fun toDouble(): kotlin.Double
public open override /*1*/ fun toFloat(): kotlin.Float
public open override /*1*/ fun toInt(): kotlin.Int
@@ -42,23 +42,23 @@ private val unaryOperations: HashMap<UnaryOperationKey<*>, Pair<Function1<Any?,
unaryOperation(BYTE, "toInt", { a -> a.toInt() }, emptyUnaryFun),
unaryOperation(BYTE, "minus", { a -> a.unaryMinus() }, { a -> a.unaryMinus() }),
unaryOperation(BYTE, "minus", { a -> a.unaryMinus() }, { a -> a.unaryMinus() }),
unaryOperation(BYTE, "toChar", { a -> a.toChar() }, emptyUnaryFun),
unaryOperation(BYTE, "toChar", { a -> a.<!DEPRECATION!>toChar<!>() }, emptyUnaryFun),
unaryOperation(BYTE, "toLong", { a -> a.toLong() }, emptyUnaryFun),
unaryOperation(BYTE, "plus", { a -> a.unaryPlus() }, emptyUnaryFun),
unaryOperation(BYTE, "toFloat", { a -> a.toFloat() }, emptyUnaryFun),
unaryOperation(BYTE, "toDouble", { a -> a.toDouble() }, emptyUnaryFun),
unaryOperation(BYTE, "toShort", { a -> a.toShort() }, emptyUnaryFun),
unaryOperation(BYTE, "toByte", { a -> a.toByte() }, emptyUnaryFun),
unaryOperation(CHAR, "toInt", { a -> a.toInt() }, emptyUnaryFun),
unaryOperation(CHAR, "toInt", { a -> a.<!DEPRECATION!>toInt<!>() }, emptyUnaryFun),
unaryOperation(CHAR, "toChar", { a -> a.toChar() }, emptyUnaryFun),
unaryOperation(CHAR, "toLong", { a -> a.toLong() }, emptyUnaryFun),
unaryOperation(CHAR, "toFloat", { a -> a.toFloat() }, emptyUnaryFun),
unaryOperation(CHAR, "toDouble", { a -> a.toDouble() }, emptyUnaryFun),
unaryOperation(CHAR, "toShort", { a -> a.toShort() }, emptyUnaryFun),
unaryOperation(CHAR, "toByte", { a -> a.toByte() }, emptyUnaryFun),
unaryOperation(CHAR, "toLong", { a -> a.<!DEPRECATION!>toLong<!>() }, emptyUnaryFun),
unaryOperation(CHAR, "toFloat", { a -> a.<!DEPRECATION!>toFloat<!>() }, emptyUnaryFun),
unaryOperation(CHAR, "toDouble", { a -> a.<!DEPRECATION!>toDouble<!>() }, emptyUnaryFun),
unaryOperation(CHAR, "toShort", { a -> a.<!DEPRECATION!>toShort<!>() }, emptyUnaryFun),
unaryOperation(CHAR, "toByte", { a -> a.<!DEPRECATION!>toByte<!>() }, emptyUnaryFun),
unaryOperation(DOUBLE, "toInt", { a -> a.toInt() }, emptyUnaryFun),
unaryOperation(DOUBLE, "minus", { a -> a.unaryMinus() }, emptyUnaryFun),
unaryOperation(DOUBLE, "toChar", { a -> a.toChar() }, emptyUnaryFun),
unaryOperation(DOUBLE, "toChar", { a -> a.<!DEPRECATION!>toChar<!>() }, emptyUnaryFun),
unaryOperation(DOUBLE, "toLong", { a -> a.toLong() }, emptyUnaryFun),
unaryOperation(DOUBLE, "plus", { a -> a.unaryPlus() }, emptyUnaryFun),
unaryOperation(DOUBLE, "toFloat", { a -> a.toFloat() }, emptyUnaryFun),
@@ -67,7 +67,7 @@ private val unaryOperations: HashMap<UnaryOperationKey<*>, Pair<Function1<Any?,
unaryOperation(DOUBLE, "toByte", { a -> a.<!DEPRECATION_ERROR!>toByte<!>() }, emptyUnaryFun),
unaryOperation(FLOAT, "toInt", { a -> a.toInt() }, emptyUnaryFun),
unaryOperation(FLOAT, "minus", { a -> a.unaryMinus() }, emptyUnaryFun),
unaryOperation(FLOAT, "toChar", { a -> a.toChar() }, emptyUnaryFun),
unaryOperation(FLOAT, "toChar", { a -> a.<!DEPRECATION!>toChar<!>() }, emptyUnaryFun),
unaryOperation(FLOAT, "toLong", { a -> a.toLong() }, emptyUnaryFun),
unaryOperation(FLOAT, "plus", { a -> a.unaryPlus() }, emptyUnaryFun),
unaryOperation(FLOAT, "toFloat", { a -> a.toFloat() }, emptyUnaryFun),
@@ -90,13 +90,13 @@ private val unaryOperations: HashMap<UnaryOperationKey<*>, Pair<Function1<Any?,
unaryOperation(LONG, "inv", { a -> a.inv() }, emptyUnaryFun),
unaryOperation(LONG, "toInt", { a -> a.toInt() }, emptyUnaryFun),
unaryOperation(LONG, "minus", { a -> a.unaryMinus() }, { a -> a.unaryMinus() }),
unaryOperation(LONG, "toChar", { a -> a.toChar() }, emptyUnaryFun),
unaryOperation(LONG, "toChar", { a -> a.<!DEPRECATION!>toChar<!>() }, emptyUnaryFun),
unaryOperation(LONG, "toLong", { a -> a.toLong() }, emptyUnaryFun),
unaryOperation(LONG, "toDouble", { a -> a.toDouble() }, emptyUnaryFun),
unaryOperation(LONG, "toFloat", { a -> a.toFloat() }, emptyUnaryFun),
unaryOperation(SHORT, "toInt", { a -> a.toInt() }, emptyUnaryFun),
unaryOperation(SHORT, "minus", { a -> a.unaryMinus() }, { a -> a.unaryMinus() }),
unaryOperation(SHORT, "toChar", { a -> a.toChar() }, emptyUnaryFun),
unaryOperation(SHORT, "toChar", { a -> a.<!DEPRECATION!>toChar<!>() }, emptyUnaryFun),
unaryOperation(SHORT, "toLong", { a -> a.toLong() }, emptyUnaryFun),
unaryOperation(SHORT, "plus", { a -> a.unaryPlus() }, emptyUnaryFun),
unaryOperation(SHORT, "toFloat", { a -> a.toFloat() }, emptyUnaryFun),