[Stdlib] Deprecate and make open Number.toChar()
^KT-46465 Fixed
This commit is contained in:
committed by
Space Team
parent
90ec84d7b7
commit
a64d8e8a31
+8
-6
@@ -104,7 +104,7 @@ public final class Byte : kotlin.Number, kotlin.Comparable<kotlin.Byte> {
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -287,7 +287,7 @@ public final class Double : kotlin.Number, kotlin.Comparable<kotlin.Double> {
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation 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") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -396,7 +396,7 @@ public final class Float : kotlin.Number, kotlin.Comparable<kotlin.Float> {
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation 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") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -579,7 +579,7 @@ public final class Long : kotlin.Number, kotlin.Comparable<kotlin.Long> {
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -620,7 +620,9 @@ public final class Nothing {
|
||||
public abstract class Number {
|
||||
/*primary*/ public constructor Number()
|
||||
public abstract fun toByte(): kotlin.Byte
|
||||
public abstract fun toChar(): kotlin.Char
|
||||
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.
|
||||
If you override toChar() function in your Number inheritor, it's recommended to gradually deprecate the overriding function and then remove it.
|
||||
See https://youtrack.jetbrains.com/issue/KT-46465 for details about the migration", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "2.3", warningSince = "1.9") public open fun toChar(): kotlin.Char
|
||||
public abstract fun toDouble(): kotlin.Double
|
||||
public abstract fun toFloat(): kotlin.Float
|
||||
public abstract fun toInt(): kotlin.Int
|
||||
@@ -727,7 +729,7 @@ public final class Short : kotlin.Number, kotlin.Comparable<kotlin.Short> {
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
|
||||
+8
-6
@@ -106,7 +106,7 @@ public final class Byte : kotlin.Number, kotlin.Comparable<kotlin.Byte>, java.io
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -299,7 +299,7 @@ public final class Double : kotlin.Number, kotlin.Comparable<kotlin.Double>, jav
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation 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") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -411,7 +411,7 @@ public final class Float : kotlin.Number, kotlin.Comparable<kotlin.Float>, java.
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation 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") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -596,7 +596,7 @@ public final class Long : kotlin.Number, kotlin.Comparable<kotlin.Long>, java.io
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -638,7 +638,9 @@ public final class Nothing {
|
||||
public abstract class Number : kotlin.Any, java.io.Serializable {
|
||||
/*primary*/ public constructor Number()
|
||||
public abstract fun toByte(): kotlin.Byte
|
||||
public abstract fun toChar(): kotlin.Char
|
||||
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.
|
||||
If you override toChar() function in your Number inheritor, it's recommended to gradually deprecate the overriding function and then remove it.
|
||||
See https://youtrack.jetbrains.com/issue/KT-46465 for details about the migration", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "2.3", warningSince = "1.9") public open fun toChar(): kotlin.Char
|
||||
public abstract fun toDouble(): kotlin.Double
|
||||
public abstract fun toFloat(): kotlin.Float
|
||||
public abstract fun toInt(): kotlin.Int
|
||||
@@ -749,7 +751,7 @@ public final class Short : kotlin.Number, kotlin.Comparable<kotlin.Short>, java.
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
|
||||
+8
-6
@@ -106,7 +106,7 @@ public final class Byte : kotlin.Number, kotlin.Comparable<kotlin.Byte>, java.io
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -301,7 +301,7 @@ public final class Double : kotlin.Number, kotlin.Comparable<kotlin.Double>, jav
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation 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") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -413,7 +413,7 @@ public final class Float : kotlin.Number, kotlin.Comparable<kotlin.Float>, java.
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation 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") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -598,7 +598,7 @@ public final class Long : kotlin.Number, kotlin.Comparable<kotlin.Long>, java.io
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -640,7 +640,9 @@ public final class Nothing {
|
||||
public abstract class Number : kotlin.Any, java.io.Serializable {
|
||||
/*primary*/ public constructor Number()
|
||||
public abstract fun toByte(): kotlin.Byte
|
||||
public abstract fun toChar(): kotlin.Char
|
||||
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.
|
||||
If you override toChar() function in your Number inheritor, it's recommended to gradually deprecate the overriding function and then remove it.
|
||||
See https://youtrack.jetbrains.com/issue/KT-46465 for details about the migration", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "2.3", warningSince = "1.9") public open fun toChar(): kotlin.Char
|
||||
public abstract fun toDouble(): kotlin.Double
|
||||
public abstract fun toFloat(): kotlin.Float
|
||||
public abstract fun toInt(): kotlin.Int
|
||||
@@ -751,7 +753,7 @@ public final class Short : kotlin.Number, kotlin.Comparable<kotlin.Short>, java.
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
|
||||
+8
-6
@@ -106,7 +106,7 @@ public final class Byte : kotlin.Number, kotlin.Comparable<kotlin.Byte>, java.io
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -299,7 +299,7 @@ public final class Double : kotlin.Number, kotlin.Comparable<kotlin.Double>, jav
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation 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") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -411,7 +411,7 @@ public final class Float : kotlin.Number, kotlin.Comparable<kotlin.Float>, java.
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation 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") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -596,7 +596,7 @@ public final class Long : kotlin.Number, kotlin.Comparable<kotlin.Long>, java.io
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
@@ -638,7 +638,9 @@ public final class Nothing {
|
||||
public abstract class Number : kotlin.Any, java.io.Serializable {
|
||||
/*primary*/ public constructor Number()
|
||||
public abstract fun toByte(): kotlin.Byte
|
||||
public abstract fun toChar(): kotlin.Char
|
||||
@kotlin.Deprecated(message = "Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.
|
||||
If you override toChar() function in your Number inheritor, it's recommended to gradually deprecate the overriding function and then remove it.
|
||||
See https://youtrack.jetbrains.com/issue/KT-46465 for details about the migration", replaceWith = kotlin.ReplaceWith(expression = "this.toInt().toChar()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "2.3", warningSince = "1.9") public open fun toChar(): kotlin.Char
|
||||
public abstract fun toDouble(): kotlin.Double
|
||||
public abstract fun toFloat(): kotlin.Float
|
||||
public abstract fun toInt(): kotlin.Int
|
||||
@@ -749,7 +751,7 @@ public final class Short : kotlin.Number, kotlin.Comparable<kotlin.Short>, java.
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Long): kotlin.Long
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final operator fun times(/*0*/ other: kotlin.Short): kotlin.Int
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toByte(): kotlin.Byte
|
||||
@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") @kotlin.internal.IntrinsicConstEvaluation 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(errorSince = "2.3", warningSince = "1.5") @kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toChar(): kotlin.Char
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toDouble(): kotlin.Double
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toFloat(): kotlin.Float
|
||||
@kotlin.internal.IntrinsicConstEvaluation public open override /*1*/ fun toInt(): kotlin.Int
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: JVM
|
||||
// DONT_TARGET_EXACT_BACKEND: JS
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR
|
||||
// KT-46465
|
||||
// WITH_STDLIB
|
||||
|
||||
class MyNumber(val b: Boolean) : Number() {
|
||||
override fun toByte(): Byte {
|
||||
return toInt().toByte()
|
||||
}
|
||||
|
||||
override fun toDouble(): Double {
|
||||
return toInt().toDouble()
|
||||
}
|
||||
|
||||
override fun toFloat(): Float {
|
||||
return toInt().toFloat()
|
||||
}
|
||||
|
||||
override fun toInt(): Int {
|
||||
return if (b) { 'O'.code } else { 'K'.code }
|
||||
}
|
||||
|
||||
override fun toLong(): Long {
|
||||
return toInt().toLong()
|
||||
}
|
||||
|
||||
override fun toShort(): Short {
|
||||
return toInt().toShort()
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
fun box(): String {
|
||||
val o = MyNumber(true)
|
||||
val k = MyNumber(false)
|
||||
return "${o.toChar()}${k.toChar()}"
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: JVM
|
||||
// DONT_TARGET_EXACT_BACKEND: JS
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// KT-46465
|
||||
// WITH_STDLIB
|
||||
|
||||
class MyNumber(val b: Boolean) : Number() {
|
||||
override fun toByte(): Byte {
|
||||
return toInt().toByte()
|
||||
}
|
||||
|
||||
override fun toDouble(): Double {
|
||||
return toInt().toDouble()
|
||||
}
|
||||
|
||||
override fun toFloat(): Float {
|
||||
return toInt().toFloat()
|
||||
}
|
||||
|
||||
override fun toChar(): Char {
|
||||
return super.toChar()
|
||||
}
|
||||
|
||||
override fun toInt(): Int {
|
||||
return if (b) { 'O'.code } else { 'K'.code }
|
||||
}
|
||||
|
||||
override fun toLong(): Long {
|
||||
return toInt().toLong()
|
||||
}
|
||||
|
||||
override fun toShort(): Short {
|
||||
return toInt().toShort()
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
fun box(): String {
|
||||
val o = MyNumber(true)
|
||||
val k = MyNumber(false)
|
||||
return "${o.toChar()}${k.toChar()}"
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: JVM
|
||||
// DONT_TARGET_EXACT_BACKEND: JS
|
||||
// KT-46465
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Some {
|
||||
fun toChar(): Char
|
||||
}
|
||||
|
||||
class MyNumber(val b: Boolean) : Number() {
|
||||
override fun toByte(): Byte {
|
||||
return toInt().toByte()
|
||||
}
|
||||
|
||||
override fun toDouble(): Double {
|
||||
return toInt().toDouble()
|
||||
}
|
||||
|
||||
override fun toFloat(): Float {
|
||||
return toInt().toFloat()
|
||||
}
|
||||
|
||||
override fun toInt(): Int {
|
||||
return if (b) { 'O'.code } else { 'K'.code }
|
||||
}
|
||||
|
||||
override fun toLong(): Long {
|
||||
return toInt().toLong()
|
||||
}
|
||||
|
||||
override fun toShort(): Short {
|
||||
return toInt().toShort()
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
fun box(): String {
|
||||
val o = MyNumber(true)
|
||||
val k = MyNumber(false)
|
||||
return "${o.toChar()}${k.toChar()}"
|
||||
}
|
||||
@@ -275,7 +275,7 @@ CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:publ
|
||||
annotations:
|
||||
IntrinsicConstEvaluation
|
||||
overridden:
|
||||
public abstract fun toChar (): kotlin.Char declared in kotlin.Number
|
||||
public open fun toChar (): kotlin.Char declared in kotlin.Number
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.Int
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:toDouble visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Double
|
||||
annotations:
|
||||
|
||||
Reference in New Issue
Block a user