diff --git a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DataFlowAnalyzer.java b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DataFlowAnalyzer.java index 2daa406b02d..fa2f1c8cdce 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DataFlowAnalyzer.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DataFlowAnalyzer.java @@ -104,6 +104,9 @@ public class DataFlowAnalyzer { } private boolean typeHasOverriddenEquals(@NotNull KotlinType type, @NotNull KtElement lookupElement) { + // `equals` from `String` is not fake override because it is marked as `IntrinsicConstEvaluation` + if (KotlinBuiltIns.isString(type)) return false; + Collection members = type.getMemberScope().getContributedFunctions( OperatorNameConventions.EQUALS, new KotlinLookupLocation(lookupElement) ); diff --git a/core/builtins/native/kotlin/Boolean.kt b/core/builtins/native/kotlin/Boolean.kt index 2b090f208f2..b988b7593dd 100644 --- a/core/builtins/native/kotlin/Boolean.kt +++ b/core/builtins/native/kotlin/Boolean.kt @@ -24,27 +24,38 @@ public class Boolean private constructor() : Comparable { /** * Returns the inverse of this boolean. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun not(): Boolean /** * Performs a logical `and` operation between this Boolean and the [other] one. Unlike the `&&` operator, * this function does not perform short-circuit evaluation. Both `this` and [other] will always be evaluated. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun and(other: Boolean): Boolean /** * Performs a logical `or` operation between this Boolean and the [other] one. Unlike the `||` operator, * this function does not perform short-circuit evaluation. Both `this` and [other] will always be evaluated. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun or(other: Boolean): Boolean /** * Performs a logical `xor` operation between this Boolean and the [other] one. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun xor(other: Boolean): Boolean + @kotlin.internal.IntrinsicConstEvaluation public override fun compareTo(other: Boolean): Int + @kotlin.internal.IntrinsicConstEvaluation + public override fun equals(other: Any?): Boolean + + @kotlin.internal.IntrinsicConstEvaluation + public override fun toString(): String + @SinceKotlin("1.3") companion object {} } diff --git a/core/builtins/native/kotlin/Char.kt b/core/builtins/native/kotlin/Char.kt index f1a62566501..0814acace32 100644 --- a/core/builtins/native/kotlin/Char.kt +++ b/core/builtins/native/kotlin/Char.kt @@ -28,14 +28,18 @@ public class Char private constructor() : Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun compareTo(other: Char): Int /** Adds the other Int value to this value resulting a Char. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Int): Char /** Subtracts the other Char value from this value resulting an Int. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Char): Int /** Subtracts the other Int value from this value resulting a Char. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Int): Char /** @@ -58,30 +62,43 @@ public class Char private constructor() : Comparable { /** Returns the value of this character as a `Byte`. */ @Deprecated("Conversion of Char to Number is deprecated. Use Char.code property instead.", ReplaceWith("this.code.toByte()")) @DeprecatedSinceKotlin(warningSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public fun toByte(): Byte /** Returns the value of this character as a `Char`. */ + @kotlin.internal.IntrinsicConstEvaluation public fun toChar(): Char /** Returns the value of this character as a `Short`. */ @Deprecated("Conversion of Char to Number is deprecated. Use Char.code property instead.", ReplaceWith("this.code.toShort()")) @DeprecatedSinceKotlin(warningSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public fun toShort(): Short /** Returns the value of this character as a `Int`. */ @Deprecated("Conversion of Char to Number is deprecated. Use Char.code property instead.", ReplaceWith("this.code")) @DeprecatedSinceKotlin(warningSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public fun toInt(): Int /** Returns the value of this character as a `Long`. */ @Deprecated("Conversion of Char to Number is deprecated. Use Char.code property instead.", ReplaceWith("this.code.toLong()")) @DeprecatedSinceKotlin(warningSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public fun toLong(): Long /** Returns the value of this character as a `Float`. */ @Deprecated("Conversion of Char to Number is deprecated. Use Char.code property instead.", ReplaceWith("this.code.toFloat()")) @DeprecatedSinceKotlin(warningSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public fun toFloat(): Float /** Returns the value of this character as a `Double`. */ @Deprecated("Conversion of Char to Number is deprecated. Use Char.code property instead.", ReplaceWith("this.code.toDouble()")) @DeprecatedSinceKotlin(warningSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public fun toDouble(): Double + @kotlin.internal.IntrinsicConstEvaluation + public override fun equals(other: Any?): Boolean + + @kotlin.internal.IntrinsicConstEvaluation + public override fun toString(): String + companion object { /** * The minimum value of a character code unit. diff --git a/core/builtins/native/kotlin/Enum.kt b/core/builtins/native/kotlin/Enum.kt index 98cdb51896f..282bd361dab 100644 --- a/core/builtins/native/kotlin/Enum.kt +++ b/core/builtins/native/kotlin/Enum.kt @@ -16,6 +16,7 @@ public abstract class Enum>(name: String, ordinal: Int): Comparable< /** * Returns the name of this enum constant, exactly as declared in its enum declaration. */ + @kotlin.internal.IntrinsicConstEvaluation public final val name: String /** diff --git a/core/builtins/native/kotlin/Primitives.kt b/core/builtins/native/kotlin/Primitives.kt index 86f443e1019..972f31e2045 100644 --- a/core/builtins/native/kotlin/Primitives.kt +++ b/core/builtins/native/kotlin/Primitives.kt @@ -41,6 +41,7 @@ public class Byte private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public override operator fun compareTo(other: Byte): Int /** @@ -48,6 +49,7 @@ public class Byte private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Short): Int /** @@ -55,6 +57,7 @@ public class Byte private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Int): Int /** @@ -62,6 +65,7 @@ public class Byte private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Long): Int /** @@ -69,6 +73,7 @@ public class Byte private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Float): Int /** @@ -76,58 +81,83 @@ public class Byte private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Double): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Byte): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Short): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Int): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Long): Long /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Float): Float /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Double): Double /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Byte): Int /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Short): Int /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Int): Int /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Long): Long /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Float): Float /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Double): Double /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Byte): Int /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Short): Int /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Int): Int /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Long): Long /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Float): Float /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Double): Double /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Byte): Int /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Short): Int /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Int): Int /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Long): Long /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Float): Float /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Double): Double /** @@ -136,6 +166,7 @@ public class Byte private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Byte): Int /** * Calculates the remainder of truncating division of this value by the other value. @@ -143,6 +174,7 @@ public class Byte private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Short): Int /** * Calculates the remainder of truncating division of this value by the other value. @@ -150,6 +182,7 @@ public class Byte private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Int): Int /** * Calculates the remainder of truncating division of this value by the other value. @@ -157,6 +190,7 @@ public class Byte private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Long): Long /** * Calculates the remainder of truncating division of this value by the other value. @@ -164,6 +198,7 @@ public class Byte private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Float): Float /** * Calculates the remainder of truncating division of this value by the other value. @@ -171,6 +206,7 @@ public class Byte private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Double): Double /** @@ -188,8 +224,10 @@ public class Byte private constructor() : Number(), Comparable { public operator fun dec(): Byte /** Returns this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun unaryPlus(): Int /** Returns the negative of this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun unaryMinus(): Int /** Creates a range from this value to the specified [other] value. */ @@ -202,6 +240,7 @@ public class Byte private constructor() : Number(), Comparable { public operator fun rangeTo(other: Long): LongRange /** Returns this value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toByte(): Byte /** * Converts this [Byte] value to [Char]. @@ -213,6 +252,7 @@ public class Byte private constructor() : Number(), Comparable { */ @Deprecated("Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", ReplaceWith("this.toInt().toChar()")) @DeprecatedSinceKotlin(warningSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public override fun toChar(): Char /** * Converts this [Byte] value to [Short]. @@ -222,6 +262,7 @@ public class Byte private constructor() : Number(), Comparable { * The least significant 8 bits of the resulting `Short` value are the same as the bits of this `Byte` value, * whereas the most significant 8 bits are filled with the sign bit of this value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toShort(): Short /** * Converts this [Byte] value to [Int]. @@ -231,6 +272,7 @@ public class Byte private constructor() : Number(), Comparable { * The least significant 8 bits of the resulting `Int` value are the same as the bits of this `Byte` value, * whereas the most significant 24 bits are filled with the sign bit of this value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toInt(): Int /** * Converts this [Byte] value to [Long]. @@ -240,19 +282,28 @@ public class Byte private constructor() : Number(), Comparable { * The least significant 8 bits of the resulting `Long` value are the same as the bits of this `Byte` value, * whereas the most significant 56 bits are filled with the sign bit of this value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toLong(): Long /** * Converts this [Byte] value to [Float]. * * The resulting `Float` value represents the same numerical value as this `Byte`. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toFloat(): Float /** * Converts this [Byte] value to [Double]. * * The resulting `Double` value represents the same numerical value as this `Byte`. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toDouble(): Double + + @kotlin.internal.IntrinsicConstEvaluation + public override fun equals(other: Any?): Boolean + + @kotlin.internal.IntrinsicConstEvaluation + public override fun toString(): String } /** @@ -289,6 +340,7 @@ public class Short private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Byte): Int /** @@ -296,6 +348,7 @@ public class Short private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public override operator fun compareTo(other: Short): Int /** @@ -303,6 +356,7 @@ public class Short private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Int): Int /** @@ -310,6 +364,7 @@ public class Short private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Long): Int /** @@ -317,6 +372,7 @@ public class Short private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Float): Int /** @@ -324,58 +380,83 @@ public class Short private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Double): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Byte): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Short): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Int): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Long): Long /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Float): Float /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Double): Double /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Byte): Int /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Short): Int /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Int): Int /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Long): Long /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Float): Float /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Double): Double /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Byte): Int /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Short): Int /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Int): Int /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Long): Long /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Float): Float /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Double): Double /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Byte): Int /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Short): Int /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Int): Int /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Long): Long /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Float): Float /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Double): Double /** @@ -384,6 +465,7 @@ public class Short private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Byte): Int /** * Calculates the remainder of truncating division of this value by the other value. @@ -391,6 +473,7 @@ public class Short private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Short): Int /** * Calculates the remainder of truncating division of this value by the other value. @@ -398,6 +481,7 @@ public class Short private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Int): Int /** * Calculates the remainder of truncating division of this value by the other value. @@ -405,6 +489,7 @@ public class Short private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Long): Long /** * Calculates the remainder of truncating division of this value by the other value. @@ -412,6 +497,7 @@ public class Short private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Float): Float /** * Calculates the remainder of truncating division of this value by the other value. @@ -419,6 +505,7 @@ public class Short private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Double): Double /** @@ -436,8 +523,10 @@ public class Short private constructor() : Number(), Comparable { public operator fun dec(): Short /** Returns this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun unaryPlus(): Int /** Returns the negative of this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun unaryMinus(): Int /** Creates a range from this value to the specified [other] value. */ @@ -457,6 +546,7 @@ public class Short private constructor() : Number(), Comparable { * * The resulting `Byte` value is represented by the least significant 8 bits of this `Short` value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toByte(): Byte /** * Converts this [Short] value to [Char]. @@ -466,8 +556,10 @@ public class Short private constructor() : Number(), Comparable { */ @Deprecated("Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", ReplaceWith("this.toInt().toChar()")) @DeprecatedSinceKotlin(warningSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public override fun toChar(): Char /** Returns this value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toShort(): Short /** * Converts this [Short] value to [Int]. @@ -477,6 +569,7 @@ public class Short private constructor() : Number(), Comparable { * The least significant 16 bits of the resulting `Int` value are the same as the bits of this `Short` value, * whereas the most significant 16 bits are filled with the sign bit of this value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toInt(): Int /** * Converts this [Short] value to [Long]. @@ -486,19 +579,28 @@ public class Short private constructor() : Number(), Comparable { * The least significant 16 bits of the resulting `Long` value are the same as the bits of this `Short` value, * whereas the most significant 48 bits are filled with the sign bit of this value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toLong(): Long /** * Converts this [Short] value to [Float]. * * The resulting `Float` value represents the same numerical value as this `Short`. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toFloat(): Float /** * Converts this [Short] value to [Double]. * * The resulting `Double` value represents the same numerical value as this `Short`. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toDouble(): Double + + @kotlin.internal.IntrinsicConstEvaluation + public override fun equals(other: Any?): Boolean + + @kotlin.internal.IntrinsicConstEvaluation + public override fun toString(): String } /** @@ -535,6 +637,7 @@ public class Int private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Byte): Int /** @@ -542,6 +645,7 @@ public class Int private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Short): Int /** @@ -549,6 +653,7 @@ public class Int private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public override operator fun compareTo(other: Int): Int /** @@ -556,6 +661,7 @@ public class Int private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Long): Int /** @@ -563,6 +669,7 @@ public class Int private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Float): Int /** @@ -570,58 +677,83 @@ public class Int private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Double): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Byte): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Short): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Int): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Long): Long /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Float): Float /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Double): Double /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Byte): Int /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Short): Int /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Int): Int /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Long): Long /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Float): Float /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Double): Double /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Byte): Int /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Short): Int /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Int): Int /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Long): Long /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Float): Float /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Double): Double /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Byte): Int /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Short): Int /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Int): Int /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Long): Long /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Float): Float /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Double): Double /** @@ -630,6 +762,7 @@ public class Int private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Byte): Int /** * Calculates the remainder of truncating division of this value by the other value. @@ -637,6 +770,7 @@ public class Int private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Short): Int /** * Calculates the remainder of truncating division of this value by the other value. @@ -644,6 +778,7 @@ public class Int private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Int): Int /** * Calculates the remainder of truncating division of this value by the other value. @@ -651,6 +786,7 @@ public class Int private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Long): Long /** * Calculates the remainder of truncating division of this value by the other value. @@ -658,6 +794,7 @@ public class Int private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Float): Float /** * Calculates the remainder of truncating division of this value by the other value. @@ -665,6 +802,7 @@ public class Int private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Double): Double /** @@ -682,8 +820,10 @@ public class Int private constructor() : Number(), Comparable { public operator fun dec(): Int /** Returns this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun unaryPlus(): Int /** Returns the negative of this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun unaryMinus(): Int /** Creates a range from this value to the specified [other] value. */ @@ -701,6 +841,7 @@ public class Int private constructor() : Number(), Comparable { * Note that only the five lowest-order bits of the [bitCount] are used as the shift distance. * The shift distance actually used is therefore always in the range `0..31`. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun shl(bitCount: Int): Int /** @@ -709,6 +850,7 @@ public class Int private constructor() : Number(), Comparable { * Note that only the five lowest-order bits of the [bitCount] are used as the shift distance. * The shift distance actually used is therefore always in the range `0..31`. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun shr(bitCount: Int): Int /** @@ -717,15 +859,20 @@ public class Int private constructor() : Number(), Comparable { * Note that only the five lowest-order bits of the [bitCount] are used as the shift distance. * The shift distance actually used is therefore always in the range `0..31`. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun ushr(bitCount: Int): Int /** Performs a bitwise AND operation between the two values. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun and(other: Int): Int /** Performs a bitwise OR operation between the two values. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun or(other: Int): Int /** Performs a bitwise XOR operation between the two values. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun xor(other: Int): Int /** Inverts the bits in this value. */ + @kotlin.internal.IntrinsicConstEvaluation public fun inv(): Int /** @@ -736,6 +883,7 @@ public class Int private constructor() : Number(), Comparable { * * The resulting `Byte` value is represented by the least significant 8 bits of this `Int` value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toByte(): Byte /** * Converts this [Int] value to [Char]. @@ -745,6 +893,7 @@ public class Int private constructor() : Number(), Comparable { * * The resulting `Char` code is represented by the least significant 16 bits of this `Int` value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toChar(): Char /** * Converts this [Int] value to [Short]. @@ -754,8 +903,10 @@ public class Int private constructor() : Number(), Comparable { * * The resulting `Short` value is represented by the least significant 16 bits of this `Int` value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toShort(): Short /** Returns this value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toInt(): Int /** * Converts this [Int] value to [Long]. @@ -765,6 +916,7 @@ public class Int private constructor() : Number(), Comparable { * The least significant 32 bits of the resulting `Long` value are the same as the bits of this `Int` value, * whereas the most significant 32 bits are filled with the sign bit of this value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toLong(): Long /** * Converts this [Int] value to [Float]. @@ -773,13 +925,21 @@ public class Int private constructor() : Number(), Comparable { * In case when this `Int` value is exactly between two `Float`s, * the one with zero at least significant bit of mantissa is selected. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toFloat(): Float /** * Converts this [Int] value to [Double]. * * The resulting `Double` value represents the same numerical value as this `Int`. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toDouble(): Double + + @kotlin.internal.IntrinsicConstEvaluation + public override fun equals(other: Any?): Boolean + + @kotlin.internal.IntrinsicConstEvaluation + public override fun toString(): String } /** @@ -816,6 +976,7 @@ public class Long private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Byte): Int /** @@ -823,6 +984,7 @@ public class Long private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Short): Int /** @@ -830,6 +992,7 @@ public class Long private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Int): Int /** @@ -837,6 +1000,7 @@ public class Long private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public override operator fun compareTo(other: Long): Int /** @@ -844,6 +1008,7 @@ public class Long private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Float): Int /** @@ -851,58 +1016,83 @@ public class Long private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Double): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Byte): Long /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Short): Long /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Int): Long /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Long): Long /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Float): Float /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Double): Double /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Byte): Long /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Short): Long /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Int): Long /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Long): Long /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Float): Float /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Double): Double /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Byte): Long /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Short): Long /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Int): Long /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Long): Long /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Float): Float /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Double): Double /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Byte): Long /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Short): Long /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Int): Long /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Long): Long /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Float): Float /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Double): Double /** @@ -911,6 +1101,7 @@ public class Long private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Byte): Long /** * Calculates the remainder of truncating division of this value by the other value. @@ -918,6 +1109,7 @@ public class Long private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Short): Long /** * Calculates the remainder of truncating division of this value by the other value. @@ -925,6 +1117,7 @@ public class Long private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Int): Long /** * Calculates the remainder of truncating division of this value by the other value. @@ -932,6 +1125,7 @@ public class Long private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Long): Long /** * Calculates the remainder of truncating division of this value by the other value. @@ -939,6 +1133,7 @@ public class Long private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Float): Float /** * Calculates the remainder of truncating division of this value by the other value. @@ -946,6 +1141,7 @@ public class Long private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Double): Double /** @@ -963,8 +1159,10 @@ public class Long private constructor() : Number(), Comparable { public operator fun dec(): Long /** Returns this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun unaryPlus(): Long /** Returns the negative of this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun unaryMinus(): Long /** Creates a range from this value to the specified [other] value. */ @@ -982,6 +1180,7 @@ public class Long private constructor() : Number(), Comparable { * Note that only the six lowest-order bits of the [bitCount] are used as the shift distance. * The shift distance actually used is therefore always in the range `0..63`. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun shl(bitCount: Int): Long /** @@ -990,6 +1189,7 @@ public class Long private constructor() : Number(), Comparable { * Note that only the six lowest-order bits of the [bitCount] are used as the shift distance. * The shift distance actually used is therefore always in the range `0..63`. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun shr(bitCount: Int): Long /** @@ -998,15 +1198,20 @@ public class Long private constructor() : Number(), Comparable { * Note that only the six lowest-order bits of the [bitCount] are used as the shift distance. * The shift distance actually used is therefore always in the range `0..63`. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun ushr(bitCount: Int): Long /** Performs a bitwise AND operation between the two values. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun and(other: Long): Long /** Performs a bitwise OR operation between the two values. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun or(other: Long): Long /** Performs a bitwise XOR operation between the two values. */ + @kotlin.internal.IntrinsicConstEvaluation public infix fun xor(other: Long): Long /** Inverts the bits in this value. */ + @kotlin.internal.IntrinsicConstEvaluation public fun inv(): Long /** @@ -1017,6 +1222,7 @@ public class Long private constructor() : Number(), Comparable { * * The resulting `Byte` value is represented by the least significant 8 bits of this `Long` value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toByte(): Byte /** * Converts this [Long] value to [Char]. @@ -1028,6 +1234,7 @@ public class Long private constructor() : Number(), Comparable { */ @Deprecated("Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", ReplaceWith("this.toInt().toChar()")) @DeprecatedSinceKotlin(warningSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public override fun toChar(): Char /** * Converts this [Long] value to [Short]. @@ -1037,6 +1244,7 @@ public class Long private constructor() : Number(), Comparable { * * The resulting `Short` value is represented by the least significant 16 bits of this `Long` value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toShort(): Short /** * Converts this [Long] value to [Int]. @@ -1046,8 +1254,10 @@ public class Long private constructor() : Number(), Comparable { * * The resulting `Int` value is represented by the least significant 32 bits of this `Long` value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toInt(): Int /** Returns this value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toLong(): Long /** * Converts this [Long] value to [Float]. @@ -1056,6 +1266,7 @@ public class Long private constructor() : Number(), Comparable { * In case when this `Long` value is exactly between two `Float`s, * the one with zero at least significant bit of mantissa is selected. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toFloat(): Float /** * Converts this [Long] value to [Double]. @@ -1064,7 +1275,14 @@ public class Long private constructor() : Number(), Comparable { * In case when this `Long` value is exactly between two `Double`s, * the one with zero at least significant bit of mantissa is selected. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toDouble(): Double + + @kotlin.internal.IntrinsicConstEvaluation + public override fun equals(other: Any?): Boolean + + @kotlin.internal.IntrinsicConstEvaluation + public override fun toString(): String } /** @@ -1116,6 +1334,7 @@ public class Float private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Byte): Int /** @@ -1123,6 +1342,7 @@ public class Float private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Short): Int /** @@ -1130,6 +1350,7 @@ public class Float private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Int): Int /** @@ -1137,6 +1358,7 @@ public class Float private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Long): Int /** @@ -1144,6 +1366,7 @@ public class Float private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public override operator fun compareTo(other: Float): Int /** @@ -1151,58 +1374,83 @@ public class Float private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Double): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Byte): Float /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Short): Float /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Int): Float /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Long): Float /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Float): Float /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Double): Double /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Byte): Float /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Short): Float /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Int): Float /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Long): Float /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Float): Float /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Double): Double /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Byte): Float /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Short): Float /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Int): Float /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Long): Float /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Float): Float /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Double): Double /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Byte): Float /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Short): Float /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Int): Float /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Long): Float /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Float): Float /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Double): Double /** @@ -1211,6 +1459,7 @@ public class Float private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Byte): Float /** * Calculates the remainder of truncating division of this value by the other value. @@ -1218,6 +1467,7 @@ public class Float private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Short): Float /** * Calculates the remainder of truncating division of this value by the other value. @@ -1225,6 +1475,7 @@ public class Float private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Int): Float /** * Calculates the remainder of truncating division of this value by the other value. @@ -1232,6 +1483,7 @@ public class Float private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Long): Float /** * Calculates the remainder of truncating division of this value by the other value. @@ -1239,6 +1491,7 @@ public class Float private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Float): Float /** * Calculates the remainder of truncating division of this value by the other value. @@ -1246,6 +1499,7 @@ public class Float private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Double): Double /** @@ -1263,8 +1517,10 @@ public class Float private constructor() : Number(), Comparable { public operator fun dec(): Float /** Returns this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun unaryPlus(): Float /** Returns the negative of this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun unaryMinus(): Float @@ -1275,6 +1531,7 @@ public class Float private constructor() : Number(), Comparable { */ @Deprecated("Unclear conversion. To achieve the same result convert to Int explicitly and then to Byte.", ReplaceWith("toInt().toByte()")) @DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public override fun toByte(): Byte /** * Converts this [Float] value to [Char]. @@ -1283,6 +1540,7 @@ public class Float private constructor() : Number(), Comparable { */ @Deprecated("Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", ReplaceWith("this.toInt().toChar()")) @DeprecatedSinceKotlin(warningSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public override fun toChar(): Char /** * Converts this [Float] value to [Short]. @@ -1291,6 +1549,7 @@ public class Float private constructor() : Number(), Comparable { */ @Deprecated("Unclear conversion. To achieve the same result convert to Int explicitly and then to Short.", ReplaceWith("toInt().toShort()")) @DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public override fun toShort(): Short /** * Converts this [Float] value to [Int]. @@ -1299,6 +1558,7 @@ public class Float private constructor() : Number(), Comparable { * Returns zero if this `Float` value is `NaN`, [Int.MIN_VALUE] if it's less than `Int.MIN_VALUE`, * [Int.MAX_VALUE] if it's bigger than `Int.MAX_VALUE`. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toInt(): Int /** * Converts this [Float] value to [Long]. @@ -1307,15 +1567,24 @@ public class Float private constructor() : Number(), Comparable { * Returns zero if this `Float` value is `NaN`, [Long.MIN_VALUE] if it's less than `Long.MIN_VALUE`, * [Long.MAX_VALUE] if it's bigger than `Long.MAX_VALUE`. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toLong(): Long /** Returns this value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toFloat(): Float /** * Converts this [Float] value to [Double]. * * The resulting `Double` value represents the same numerical value as this `Float`. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toDouble(): Double + + @kotlin.internal.IntrinsicConstEvaluation + public override fun equals(other: Any?): Boolean + + @kotlin.internal.IntrinsicConstEvaluation + public override fun toString(): String } /** @@ -1367,6 +1636,7 @@ public class Double private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Byte): Int /** @@ -1374,6 +1644,7 @@ public class Double private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Short): Int /** @@ -1381,6 +1652,7 @@ public class Double private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Int): Int /** @@ -1388,6 +1660,7 @@ public class Double private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Long): Int /** @@ -1395,6 +1668,7 @@ public class Double private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun compareTo(other: Float): Int /** @@ -1402,58 +1676,83 @@ public class Double private constructor() : Number(), Comparable { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */ + @kotlin.internal.IntrinsicConstEvaluation public override operator fun compareTo(other: Double): Int /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Byte): Double /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Short): Double /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Int): Double /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Long): Double /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Float): Double /** Adds the other value to this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Double): Double /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Byte): Double /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Short): Double /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Int): Double /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Long): Double /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Float): Double /** Subtracts the other value from this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun minus(other: Double): Double /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Byte): Double /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Short): Double /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Int): Double /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Long): Double /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Float): Double /** Multiplies this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun times(other: Double): Double /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Byte): Double /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Short): Double /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Int): Double /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Long): Double /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Float): Double /** Divides this value by the other value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun div(other: Double): Double /** @@ -1462,6 +1761,7 @@ public class Double private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Byte): Double /** * Calculates the remainder of truncating division of this value by the other value. @@ -1469,6 +1769,7 @@ public class Double private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Short): Double /** * Calculates the remainder of truncating division of this value by the other value. @@ -1476,6 +1777,7 @@ public class Double private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Int): Double /** * Calculates the remainder of truncating division of this value by the other value. @@ -1483,6 +1785,7 @@ public class Double private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Long): Double /** * Calculates the remainder of truncating division of this value by the other value. @@ -1490,6 +1793,7 @@ public class Double private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Float): Double /** * Calculates the remainder of truncating division of this value by the other value. @@ -1497,6 +1801,7 @@ public class Double private constructor() : Number(), Comparable { * The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor. */ @SinceKotlin("1.1") + @kotlin.internal.IntrinsicConstEvaluation public operator fun rem(other: Double): Double /** @@ -1514,8 +1819,10 @@ public class Double private constructor() : Number(), Comparable { public operator fun dec(): Double /** Returns this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun unaryPlus(): Double /** Returns the negative of this value. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun unaryMinus(): Double @@ -1526,6 +1833,7 @@ public class Double private constructor() : Number(), Comparable { */ @Deprecated("Unclear conversion. To achieve the same result convert to Int explicitly and then to Byte.", ReplaceWith("toInt().toByte()")) @DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public override fun toByte(): Byte /** * Converts this [Double] value to [Char]. @@ -1534,6 +1842,7 @@ public class Double private constructor() : Number(), Comparable { */ @Deprecated("Direct conversion to Char is deprecated. Use toInt().toChar() or Char constructor instead.", ReplaceWith("this.toInt().toChar()")) @DeprecatedSinceKotlin(warningSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public override fun toChar(): Char /** * Converts this [Double] value to [Short]. @@ -1542,6 +1851,7 @@ public class Double private constructor() : Number(), Comparable { */ @Deprecated("Unclear conversion. To achieve the same result convert to Int explicitly and then to Short.", ReplaceWith("toInt().toShort()")) @DeprecatedSinceKotlin(warningSince = "1.3", errorSince = "1.5") + @kotlin.internal.IntrinsicConstEvaluation public override fun toShort(): Short /** * Converts this [Double] value to [Int]. @@ -1550,6 +1860,7 @@ public class Double private constructor() : Number(), Comparable { * Returns zero if this `Double` value is `NaN`, [Int.MIN_VALUE] if it's less than `Int.MIN_VALUE`, * [Int.MAX_VALUE] if it's bigger than `Int.MAX_VALUE`. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toInt(): Int /** * Converts this [Double] value to [Long]. @@ -1558,6 +1869,7 @@ public class Double private constructor() : Number(), Comparable { * Returns zero if this `Double` value is `NaN`, [Long.MIN_VALUE] if it's less than `Long.MIN_VALUE`, * [Long.MAX_VALUE] if it's bigger than `Long.MAX_VALUE`. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toLong(): Long /** * Converts this [Double] value to [Float]. @@ -1566,8 +1878,16 @@ public class Double private constructor() : Number(), Comparable { * In case when this `Double` value is exactly between two `Float`s, * the one with zero at least significant bit of mantissa is selected. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toFloat(): Float /** Returns this value. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun toDouble(): Double + + @kotlin.internal.IntrinsicConstEvaluation + public override fun equals(other: Any?): Boolean + + @kotlin.internal.IntrinsicConstEvaluation + public override fun toString(): String } diff --git a/core/builtins/native/kotlin/String.kt b/core/builtins/native/kotlin/String.kt index d987f2a7912..11c74ea36c0 100644 --- a/core/builtins/native/kotlin/String.kt +++ b/core/builtins/native/kotlin/String.kt @@ -26,8 +26,10 @@ public class String : Comparable, CharSequence { /** * Returns a string obtained by concatenating this string with the string representation of the given [other] object. */ + @kotlin.internal.IntrinsicConstEvaluation public operator fun plus(other: Any?): String + @kotlin.internal.IntrinsicConstEvaluation public override val length: Int /** @@ -36,9 +38,17 @@ public class String : Comparable, CharSequence { * If the [index] is out of bounds of this string, throws an [IndexOutOfBoundsException] except in Kotlin/JS * where the behavior is unspecified. */ + @kotlin.internal.IntrinsicConstEvaluation public override fun get(index: Int): Char public override fun subSequence(startIndex: Int, endIndex: Int): CharSequence + @kotlin.internal.IntrinsicConstEvaluation public override fun compareTo(other: String): Int + + @kotlin.internal.IntrinsicConstEvaluation + public override fun equals(other: Any?): Boolean + + @kotlin.internal.IntrinsicConstEvaluation + public override fun toString(): String } diff --git a/generators/builtins/primitives.kt b/generators/builtins/primitives.kt index 4b597b590a8..d76e0ebc961 100644 --- a/generators/builtins/primitives.kt +++ b/generators/builtins/primitives.kt @@ -187,6 +187,8 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { } generateConversions(kind) + generateEquals() + generateToString() out.println("}\n") } @@ -207,6 +209,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { * Returns zero if this value is equal to the specified other value, a negative number if it's less than other, * or a positive number if it's greater than other. */""") + out.println(" @kotlin.internal.IntrinsicConstEvaluation") out.print(" public ") if (otherKind == thisKind) out.print("override ") out.println("operator fun compareTo(other: ${otherKind.capitalized}): Int") @@ -229,6 +232,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { "rem" -> out.println(" @SinceKotlin(\"1.1\")") } + out.println(" @kotlin.internal.IntrinsicConstEvaluation") out.println(" public operator fun $name(other: ${otherKind.capitalized}): ${returnType.capitalized}") } out.println() @@ -258,6 +262,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { for ((name, doc) in unaryPlusMinusOperators) { val returnType = if (kind in listOf(PrimitiveType.SHORT, PrimitiveType.BYTE, PrimitiveType.CHAR)) "Int" else kind.capitalized out.println(" /** $doc */") + out.println(" @kotlin.internal.IntrinsicConstEvaluation") out.println(" public operator fun $name(): $returnType") } out.println() @@ -272,6 +277,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { out.println(" *") out.println(detail.replaceIndent(" ")) out.println(" */") + out.println(" @kotlin.internal.IntrinsicConstEvaluation") out.println(" public infix fun $name(bitCount: Int): $className") out.println() } @@ -280,10 +286,12 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { for ((name, doc) in bitwiseOperators) { out.println(" /** $doc */") since?.let { out.println(" @SinceKotlin(\"$it\")") } + out.println(" @kotlin.internal.IntrinsicConstEvaluation") out.println(" public infix fun $name(other: $className): $className") } out.println(" /** Inverts the bits in this value. */") since?.let { out.println(" @SinceKotlin(\"$it\")") } + out.println(" @kotlin.internal.IntrinsicConstEvaluation") out.println(" public fun inv(): $className") out.println() } @@ -450,8 +458,21 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { out.println(" @DeprecatedSinceKotlin(warningSince = \"1.5\")") } + out.println(" @kotlin.internal.IntrinsicConstEvaluation") out.println(" public override fun to$otherName(): $otherName") } + out.println() + } + + private fun generateEquals() { + out.println(" @kotlin.internal.IntrinsicConstEvaluation") + out.println(" public override fun equals(other: Any?): Boolean") + out.println() + } + + private fun generateToString() { + out.println(" @kotlin.internal.IntrinsicConstEvaluation") + out.println(" public override fun toString(): String") } } @@ -486,6 +507,7 @@ class GenerateFloorDivMod(out: PrintWriter) : BuiltInsSourceGenerator(out) { out.printDoc(GeneratePrimitives.binaryOperatorDoc("floorDiv", thisKind, otherKind), "") out.println("""@SinceKotlin("1.5")""") out.println("@kotlin.internal.InlineOnly") + out.println("@kotlin.internal.IntrinsicConstEvaluation") val declaration = "public inline fun ${thisKind.capitalized}.floorDiv(other: ${otherKind.capitalized}): $returnTypeName" if (thisKind == otherKind && thisKind >= PrimitiveType.INT) { out.println( @@ -511,6 +533,7 @@ class GenerateFloorDivMod(out: PrintWriter) : BuiltInsSourceGenerator(out) { out.printDoc(GeneratePrimitives.binaryOperatorDoc("mod", thisKind, otherKind),"") out.println("""@SinceKotlin("1.5")""") out.println("@kotlin.internal.InlineOnly") + out.println("@kotlin.internal.IntrinsicConstEvaluation") val declaration = "public inline fun ${thisKind.capitalized}.mod(other: ${otherKind.capitalized}): ${returnType.capitalized}" if (thisKind == otherKind && thisKind >= PrimitiveType.INT) { out.println( @@ -536,6 +559,7 @@ class GenerateFloorDivMod(out: PrintWriter) : BuiltInsSourceGenerator(out) { out.printDoc(GeneratePrimitives.binaryOperatorDoc("mod", thisKind, otherKind), "") out.println("""@SinceKotlin("1.5")""") out.println("@kotlin.internal.InlineOnly") + out.println("@kotlin.internal.IntrinsicConstEvaluation") val declaration = "public inline fun ${thisKind.capitalized}.mod(other: ${otherKind.capitalized}): ${operationType.capitalized}" if (thisKind == otherKind && thisKind >= PrimitiveType.INT) { out.println( diff --git a/generators/builtins/unsignedTypes.kt b/generators/builtins/unsignedTypes.kt index f7d37728134..233b10a58f1 100644 --- a/generators/builtins/unsignedTypes.kt +++ b/generators/builtins/unsignedTypes.kt @@ -67,7 +67,7 @@ class UnsignedTypeGenerator(val type: UnsignedType, out: PrintWriter) : BuiltIns out.println("@SinceKotlin(\"1.5\")") out.println("@WasExperimental(ExperimentalUnsignedTypes::class)") out.println("@JvmInline") - out.println("public value class $className @PublishedApi internal constructor(@PublishedApi internal val data: $storageType) : Comparable<$className> {") + out.println("public value class $className @kotlin.internal.IntrinsicConstEvaluation @PublishedApi internal constructor(@PublishedApi internal val data: $storageType) : Comparable<$className> {") out.println() out.println(""" companion object { /** diff --git a/libraries/stdlib/api/js-v1/kotlin.kt b/libraries/stdlib/api/js-v1/kotlin.kt index 915c48b05a4..4c9f0db252b 100644 --- a/libraries/stdlib/api/js-v1/kotlin.kt +++ b/libraries/stdlib/api/js-v1/kotlin.kt @@ -1,6 +1,7 @@ @kotlin.SinceKotlin(version = "1.5") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public val kotlin.Char.code: kotlin.Int { get; } @kotlin.SinceKotlin(version = "1.2") @@ -314,66 +315,82 @@ public inline fun kotlin.UShort.countTrailingZeroBits(): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.floorDiv(other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.floorDiv(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.floorDiv(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.floorDiv(other: kotlin.Short): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.floorDiv(other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.floorDiv(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.floorDiv(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.floorDiv(other: kotlin.Short): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.floorDiv(other: kotlin.Byte): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.floorDiv(other: kotlin.Int): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.floorDiv(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.floorDiv(other: kotlin.Short): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.floorDiv(other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.floorDiv(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.floorDiv(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.floorDiv(other: kotlin.Short): kotlin.Int @kotlin.internal.InlineOnly @@ -444,82 +461,102 @@ public inline fun kotlin.Result.mapCatching(transform: (value: T) -> R @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.mod(other: kotlin.Byte): kotlin.Byte @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.mod(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.mod(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.mod(other: kotlin.Short): kotlin.Short @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Double.mod(other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Double.mod(other: kotlin.Float): kotlin.Double @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Float.mod(other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Float.mod(other: kotlin.Float): kotlin.Float @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.mod(other: kotlin.Byte): kotlin.Byte @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.mod(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.mod(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.mod(other: kotlin.Short): kotlin.Short @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.mod(other: kotlin.Byte): kotlin.Byte @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.mod(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.mod(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.mod(other: kotlin.Short): kotlin.Short @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.mod(other: kotlin.Byte): kotlin.Byte @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.mod(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.mod(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.mod(other: kotlin.Short): kotlin.Short @kotlin.internal.InlineOnly @@ -889,14 +926,25 @@ public open class AssertionError : kotlin.Error { } public final class Boolean : kotlin.Comparable { +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun and(other: kotlin.Boolean): kotlin.Boolean +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override operator fun compareTo(other: kotlin.Boolean): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun not(): kotlin.Boolean +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun or(other: kotlin.Boolean): kotlin.Boolean +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override fun toString(): kotlin.String + +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun xor(other: kotlin.Boolean): kotlin.Boolean @kotlin.SinceKotlin(version = "1.3") @@ -927,56 +975,83 @@ public final annotation class BuilderInference : kotlin.Annotation { } public final class Byte : kotlin.Number, kotlin.Comparable { +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override operator fun compareTo(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Double): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Float): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Long): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Short): kotlin.Int public final operator fun dec(): kotlin.Byte +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Short): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + public final operator fun inc(): kotlin.Byte +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Short): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Short): kotlin.Int public final operator fun rangeTo(other: kotlin.Byte): kotlin.ranges.IntRange @@ -988,53 +1063,77 @@ public final class Byte : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Float): kotlin.Float @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Short): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Short): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override 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 fun toChar(): kotlin.Char +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toDouble(): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toFloat(): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toInt(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toLong(): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toShort(): kotlin.Short +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override fun toString(): kotlin.String + +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun unaryMinus(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun unaryPlus(): kotlin.Int public companion object of Byte { @@ -1065,46 +1164,63 @@ public final class ByteArray { } public final class Char : kotlin.Comparable { +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override operator fun compareTo(other: kotlin.Char): kotlin.Int public final operator fun dec(): kotlin.Char +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + public final operator fun inc(): kotlin.Char +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Char): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Int): kotlin.Char +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Int): kotlin.Char public final operator fun rangeTo(other: kotlin.Char): kotlin.ranges.CharRange @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") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final fun toByte(): kotlin.Byte +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final fun toChar(): kotlin.Char @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") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation 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") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation 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") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation 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") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation 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") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final fun toShort(): kotlin.Short +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override fun toString(): kotlin.String + public companion object of Char { public const final val MAX_HIGH_SURROGATE: kotlin.Char = \uDBFF ('?') { get; } @@ -1249,110 +1365,161 @@ public final enum class DeprecationLevel : kotlin.Enum } public final class Double : kotlin.Number, kotlin.Comparable { +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override operator fun compareTo(other: kotlin.Double): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Float): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Long): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Short): kotlin.Int public final operator fun dec(): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Byte): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Float): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Int): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Long): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Short): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + public final operator fun inc(): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Byte): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Float): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Int): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Long): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Short): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Byte): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Float): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Int): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Long): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Short): kotlin.Double @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Byte): kotlin.Double @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Float): kotlin.Double @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Int): kotlin.Double @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Long): kotlin.Double @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Short): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Byte): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Float): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Int): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Long): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(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 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 fun toChar(): kotlin.Char +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toDouble(): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toFloat(): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toInt(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toLong(): kotlin.Long @kotlin.Deprecated(message = "Unclear conversion. To achieve the same result convert to Int explicitly and then to Short.", replaceWith = kotlin.ReplaceWith(expression = "toInt().toShort()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toShort(): kotlin.Short +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override fun toString(): kotlin.String + +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun unaryMinus(): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun unaryPlus(): kotlin.Double public companion object of Double { @@ -1399,6 +1566,7 @@ public final annotation class DslMarker : kotlin.Annotation { public abstract class Enum> : kotlin.Comparable { public constructor Enum>(name: kotlin.String, ordinal: kotlin.Int) +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final val name: kotlin.String { get; } public final val ordinal: kotlin.Int { get; } @@ -1486,110 +1654,161 @@ public final annotation class ExtensionFunctionType : kotlin.Annotation { } public final class Float : kotlin.Number, kotlin.Comparable { +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Double): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override operator fun compareTo(other: kotlin.Float): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Long): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Short): kotlin.Int public final operator fun dec(): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Byte): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Int): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Long): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Short): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + public final operator fun inc(): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Byte): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Int): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Long): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Short): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Byte): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Int): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Long): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Short): kotlin.Float @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Byte): kotlin.Float @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Float): kotlin.Float @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Int): kotlin.Float @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Long): kotlin.Float @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Short): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Byte): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Int): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Long): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(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 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 fun toChar(): kotlin.Char +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toDouble(): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toFloat(): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toInt(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toLong(): kotlin.Long @kotlin.Deprecated(message = "Unclear conversion. To achieve the same result convert to Int explicitly and then to Short.", replaceWith = kotlin.ReplaceWith(expression = "toInt().toShort()", imports = {})) @kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toShort(): kotlin.Short +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override fun toString(): kotlin.String + +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun unaryMinus(): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun unaryPlus(): kotlin.Float public companion object of Float { @@ -1658,62 +1877,92 @@ public open class IndexOutOfBoundsException : kotlin.RuntimeException { } public final class Int : kotlin.Number, kotlin.Comparable { +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun and(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Double): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Float): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override operator fun compareTo(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Long): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Short): kotlin.Int public final operator fun dec(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Short): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + public final operator fun inc(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final fun inv(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Short): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun or(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Short): kotlin.Int public final operator fun rangeTo(other: kotlin.Byte): kotlin.ranges.IntRange @@ -1725,59 +1974,87 @@ public final class Int : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Float): kotlin.Float @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Short): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun shl(bitCount: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun shr(bitCount: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Short): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toByte(): kotlin.Byte +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toChar(): kotlin.Char +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toDouble(): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toFloat(): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toInt(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toLong(): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toShort(): kotlin.Short +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override fun toString(): kotlin.String + +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun unaryMinus(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun unaryPlus(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun ushr(bitCount: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun xor(other: kotlin.Int): kotlin.Int public companion object of Int { @@ -1853,62 +2130,92 @@ public final enum class LazyThreadSafetyMode : kotlin.Enum { +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun and(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun compareTo(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun compareTo(other: kotlin.Double): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun compareTo(other: kotlin.Float): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun compareTo(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override operator fun compareTo(other: kotlin.Long): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun compareTo(other: kotlin.Short): kotlin.Int public final operator fun dec(): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun div(other: kotlin.Byte): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun div(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun div(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun div(other: kotlin.Int): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun div(other: kotlin.Short): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + public final operator fun inc(): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final fun inv(): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun minus(other: kotlin.Byte): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun minus(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun minus(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun minus(other: kotlin.Int): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun minus(other: kotlin.Short): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun or(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun plus(other: kotlin.Byte): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun plus(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun plus(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun plus(other: kotlin.Int): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun plus(other: kotlin.Short): kotlin.Long public final operator fun rangeTo(other: kotlin.Byte): kotlin.ranges.LongRange @@ -1920,61 +2227,89 @@ public final class Long : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.LongRange @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun rem(other: kotlin.Byte): kotlin.Long @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun rem(other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun rem(other: kotlin.Float): kotlin.Float @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun rem(other: kotlin.Int): kotlin.Long @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun rem(other: kotlin.Short): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun shl(bitCount: kotlin.Int): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun shr(bitCount: kotlin.Int): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun times(other: kotlin.Byte): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun times(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun times(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun times(other: kotlin.Int): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun times(other: kotlin.Short): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override 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 fun toChar(): kotlin.Char +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toDouble(): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toFloat(): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toInt(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toLong(): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toShort(): kotlin.Short +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override fun toString(): kotlin.String + +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun unaryMinus(): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation /*∆*/ public final operator fun unaryPlus(): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun ushr(bitCount: kotlin.Int): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final infix fun xor(other: kotlin.Long): kotlin.Long public companion object of Long { @@ -2186,56 +2521,83 @@ public open class RuntimeException : kotlin.Exception { } public final class Short : kotlin.Number, kotlin.Comparable { +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Double): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Float): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun compareTo(other: kotlin.Long): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override operator fun compareTo(other: kotlin.Short): kotlin.Int public final operator fun dec(): kotlin.Short +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun div(other: kotlin.Short): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + public final operator fun inc(): kotlin.Short +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun minus(other: kotlin.Short): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Short): kotlin.Int public final operator fun rangeTo(other: kotlin.Byte): kotlin.ranges.IntRange @@ -2247,53 +2609,77 @@ public final class Short : kotlin.Number, kotlin.Comparable { public final operator fun rangeTo(other: kotlin.Short): kotlin.ranges.IntRange @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Float): kotlin.Float @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.1") +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun rem(other: kotlin.Short): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Byte): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Double): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Float): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Int): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Long): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun times(other: kotlin.Short): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override 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 fun toChar(): kotlin.Char +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toDouble(): kotlin.Double +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toFloat(): kotlin.Float +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toInt(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toLong(): kotlin.Long +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override fun toShort(): kotlin.Short +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override fun toString(): kotlin.String + +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun unaryMinus(): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun unaryPlus(): kotlin.Int public companion object of Short { @@ -2335,16 +2721,26 @@ public final annotation class SinceKotlin : kotlin.Annotation { public final class String : kotlin.Comparable, kotlin.CharSequence { public constructor String() +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override val length: kotlin.Int { get; } +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override operator fun compareTo(other: kotlin.String): kotlin.Int +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public open override operator fun get(index: kotlin.Int): kotlin.Char +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation public final operator fun plus(other: kotlin.Any?): kotlin.String public open override fun subSequence(startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence +/*∆*/ @kotlin.internal.IntrinsicConstEvaluation + public open override fun toString(): kotlin.String + public companion object of String { } } diff --git a/libraries/stdlib/api/js-v1/kotlin.text.kt b/libraries/stdlib/api/js-v1/kotlin.text.kt index dc7311afe86..3f36e6c1ca0 100644 --- a/libraries/stdlib/api/js-v1/kotlin.text.kt +++ b/libraries/stdlib/api/js-v1/kotlin.text.kt @@ -1182,8 +1182,10 @@ public inline fun kotlin.String.trimEnd(predicate: (kotlin.Char) -> kotlin.Boole public fun kotlin.String.trimEnd(vararg chars: kotlin.Char): kotlin.String +@kotlin.internal.IntrinsicConstEvaluation public fun kotlin.String.trimIndent(): kotlin.String +@kotlin.internal.IntrinsicConstEvaluation public fun kotlin.String.trimMargin(marginPrefix: kotlin.String = ...): kotlin.String public fun kotlin.CharSequence.trimStart(): kotlin.CharSequence diff --git a/libraries/stdlib/api/js/kotlin.kt b/libraries/stdlib/api/js/kotlin.kt index 01c202fc676..4bdac80f715 100644 --- a/libraries/stdlib/api/js/kotlin.kt +++ b/libraries/stdlib/api/js/kotlin.kt @@ -1,6 +1,7 @@ @kotlin.SinceKotlin(version = "1.5") @kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public val kotlin.Char.code: kotlin.Int { get; } @kotlin.SinceKotlin(version = "1.2") @@ -277,66 +278,82 @@ public inline fun kotlin.UShort.countTrailingZeroBits(): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.floorDiv(other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.floorDiv(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.floorDiv(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.floorDiv(other: kotlin.Short): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.floorDiv(other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.floorDiv(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.floorDiv(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.floorDiv(other: kotlin.Short): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.floorDiv(other: kotlin.Byte): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.floorDiv(other: kotlin.Int): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.floorDiv(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.floorDiv(other: kotlin.Short): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.floorDiv(other: kotlin.Byte): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.floorDiv(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.floorDiv(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.floorDiv(other: kotlin.Short): kotlin.Int @kotlin.internal.InlineOnly @@ -407,82 +424,102 @@ public inline fun kotlin.Result.mapCatching(transform: (value: T) -> R @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.mod(other: kotlin.Byte): kotlin.Byte @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.mod(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.mod(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Byte.mod(other: kotlin.Short): kotlin.Short @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Double.mod(other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Double.mod(other: kotlin.Float): kotlin.Double @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Float.mod(other: kotlin.Double): kotlin.Double @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Float.mod(other: kotlin.Float): kotlin.Float @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.mod(other: kotlin.Byte): kotlin.Byte @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.mod(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.mod(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Int.mod(other: kotlin.Short): kotlin.Short @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.mod(other: kotlin.Byte): kotlin.Byte @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.mod(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.mod(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Long.mod(other: kotlin.Short): kotlin.Short @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.mod(other: kotlin.Byte): kotlin.Byte @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.mod(other: kotlin.Int): kotlin.Int @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.mod(other: kotlin.Long): kotlin.Long @kotlin.SinceKotlin(version = "1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun kotlin.Short.mod(other: kotlin.Short): kotlin.Short @kotlin.internal.InlineOnly @@ -849,16 +886,16 @@ public final class Boolean : kotlin.Comparable { public open override operator fun compareTo(other: kotlin.Boolean): kotlin.Int -/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean -/*∆*/ + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + /*∆*/ public open override fun hashCode(): kotlin.Int /*∆*/ public final operator fun not(): kotlin.Boolean public final infix fun or(other: kotlin.Boolean): kotlin.Boolean -/*∆*/ public open override fun toString(): kotlin.String -/*∆*/ + public open override fun toString(): kotlin.String + public final infix fun xor(other: kotlin.Boolean): kotlin.Boolean @kotlin.SinceKotlin(version = "1.3") @@ -915,8 +952,8 @@ public final class Byte : kotlin.Number, kotlin.Comparable { public final operator fun div(other: kotlin.Short): kotlin.Int -/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean -/*∆*/ + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + /*∆*/ public open override fun hashCode(): kotlin.Int /*∆*/ public final operator fun inc(): kotlin.Byte @@ -999,8 +1036,8 @@ public final class Byte : kotlin.Number, kotlin.Comparable { public open override fun toShort(): kotlin.Short -/*∆*/ public open override fun toString(): kotlin.String -/*∆*/ + public open override fun toString(): kotlin.String + public final operator fun unaryMinus(): kotlin.Int public final operator fun unaryPlus(): kotlin.Int @@ -1041,8 +1078,8 @@ public final class Char : kotlin.Comparable { public final operator fun dec(): kotlin.Char -/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean -/*∆*/ + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + /*∆*/ public open override fun hashCode(): kotlin.Int /*∆*/ public final operator fun inc(): kotlin.Char @@ -1082,8 +1119,8 @@ public final class Char : kotlin.Comparable { public final fun toShort(): kotlin.Short /*∆*/ @kotlin.js.JsName(name = "toString") -/*∆*/ public open override fun toString(): kotlin.String -/*∆*/ + public open override fun toString(): kotlin.String + public companion object of Char { public const final val MAX_HIGH_SURROGATE: kotlin.Char = \uDBFF ('?') { get; } @@ -1246,8 +1283,8 @@ public final class Double : kotlin.Number, kotlin.Comparable { public final operator fun div(other: kotlin.Short): kotlin.Double -/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean -/*∆*/ + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + /*∆*/ public open override fun hashCode(): kotlin.Int /*∆*/ public final operator fun inc(): kotlin.Double @@ -1326,8 +1363,8 @@ public final class Double : kotlin.Number, kotlin.Comparable { @kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3") public open override fun toShort(): kotlin.Short -/*∆*/ public open override fun toString(): kotlin.String -/*∆*/ + public open override fun toString(): kotlin.String + public final operator fun unaryMinus(): kotlin.Double public final operator fun unaryPlus(): kotlin.Double @@ -1487,8 +1524,8 @@ public final class Float : kotlin.Number, kotlin.Comparable { public final operator fun div(other: kotlin.Short): kotlin.Float -/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean -/*∆*/ + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + /*∆*/ public open override fun hashCode(): kotlin.Int /*∆*/ public final operator fun inc(): kotlin.Float @@ -1567,8 +1604,8 @@ public final class Float : kotlin.Number, kotlin.Comparable { @kotlin.DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3") public open override fun toShort(): kotlin.Short -/*∆*/ public open override fun toString(): kotlin.String -/*∆*/ + public open override fun toString(): kotlin.String + public final operator fun unaryMinus(): kotlin.Float public final operator fun unaryPlus(): kotlin.Float @@ -1664,8 +1701,8 @@ public final class Int : kotlin.Number, kotlin.Comparable { public final operator fun div(other: kotlin.Short): kotlin.Int -/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean -/*∆*/ + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + /*∆*/ public open override fun hashCode(): kotlin.Int /*∆*/ public final operator fun inc(): kotlin.Int @@ -1754,8 +1791,8 @@ public final class Int : kotlin.Number, kotlin.Comparable { public open override fun toShort(): kotlin.Short -/*∆*/ public open override fun toString(): kotlin.String -/*∆*/ + public open override fun toString(): kotlin.String + public final operator fun unaryMinus(): kotlin.Int public final operator fun unaryPlus(): kotlin.Int @@ -1865,8 +1902,8 @@ public final class Long : kotlin.Number, kotlin.Comparable { /*∆*/ public final inline operator fun div(other: kotlin.Short): kotlin.Long -/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean -/*∆*/ + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + /*∆*/ public open override fun hashCode(): kotlin.Int /*∆*/ public final operator fun inc(): kotlin.Long @@ -1957,8 +1994,8 @@ public final class Long : kotlin.Number, kotlin.Comparable { public open override fun toShort(): kotlin.Short -/*∆*/ public open override fun toString(): kotlin.String -/*∆*/ + public open override fun toString(): kotlin.String + public final operator fun unaryMinus(): kotlin.Long /*∆*/ public final inline operator fun unaryPlus(): kotlin.Long @@ -2202,8 +2239,8 @@ public final class Short : kotlin.Number, kotlin.Comparable { public final operator fun div(other: kotlin.Short): kotlin.Int -/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean -/*∆*/ + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + /*∆*/ public open override fun hashCode(): kotlin.Int /*∆*/ public final operator fun inc(): kotlin.Short @@ -2285,8 +2322,8 @@ public final class Short : kotlin.Number, kotlin.Comparable { public open override fun toShort(): kotlin.Short -/*∆*/ public open override fun toString(): kotlin.String -/*∆*/ + public open override fun toString(): kotlin.String + public final operator fun unaryMinus(): kotlin.Int public final operator fun unaryPlus(): kotlin.Int @@ -2334,8 +2371,8 @@ public final class String : kotlin.Comparable, kotlin.CharSequenc public open override operator fun compareTo(other: kotlin.String): kotlin.Int -/*∆*/ public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean -/*∆*/ + public open override operator fun equals(other: kotlin.Any?): kotlin.Boolean + public open override operator fun get(index: kotlin.Int): kotlin.Char /*∆*/ public open override fun hashCode(): kotlin.Int @@ -2344,8 +2381,8 @@ public final class String : kotlin.Comparable, kotlin.CharSequenc public open override fun subSequence(startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence -/*∆*/ public open override fun toString(): kotlin.String -/*∆*/ + public open override fun toString(): kotlin.String + public companion object of String { } } diff --git a/libraries/stdlib/api/js/kotlin.text.kt b/libraries/stdlib/api/js/kotlin.text.kt index dc7311afe86..3f36e6c1ca0 100644 --- a/libraries/stdlib/api/js/kotlin.text.kt +++ b/libraries/stdlib/api/js/kotlin.text.kt @@ -1182,8 +1182,10 @@ public inline fun kotlin.String.trimEnd(predicate: (kotlin.Char) -> kotlin.Boole public fun kotlin.String.trimEnd(vararg chars: kotlin.Char): kotlin.String +@kotlin.internal.IntrinsicConstEvaluation public fun kotlin.String.trimIndent(): kotlin.String +@kotlin.internal.IntrinsicConstEvaluation public fun kotlin.String.trimMargin(marginPrefix: kotlin.String = ...): kotlin.String public fun kotlin.CharSequence.trimStart(): kotlin.CharSequence diff --git a/libraries/stdlib/jvm/src/kotlin/reflect/KCallable.kt b/libraries/stdlib/jvm/src/kotlin/reflect/KCallable.kt index d76d25db6e9..e38b5122481 100644 --- a/libraries/stdlib/jvm/src/kotlin/reflect/KCallable.kt +++ b/libraries/stdlib/jvm/src/kotlin/reflect/KCallable.kt @@ -19,6 +19,7 @@ public actual interface KCallable : KAnnotatedElement { * - property accessors: the getter for a property named "foo" will have the name "", * the setter, similarly, will have the name "". */ + @kotlin.internal.IntrinsicConstEvaluation public actual val name: String /** diff --git a/libraries/stdlib/src/kotlin/CharCode.kt b/libraries/stdlib/src/kotlin/CharCode.kt index 4b5ab1ff6b5..e622fe5a742 100644 --- a/libraries/stdlib/src/kotlin/CharCode.kt +++ b/libraries/stdlib/src/kotlin/CharCode.kt @@ -46,4 +46,5 @@ public expect fun Char(code: UShort): Char @WasExperimental(ExperimentalStdlibApi::class) @kotlin.internal.InlineOnly @Suppress("DEPRECATION") +@kotlin.internal.IntrinsicConstEvaluation public inline val Char.code: Int get() = this.toInt() diff --git a/libraries/stdlib/src/kotlin/reflect/KCallable.kt b/libraries/stdlib/src/kotlin/reflect/KCallable.kt index 10e899964c7..e227d937051 100644 --- a/libraries/stdlib/src/kotlin/reflect/KCallable.kt +++ b/libraries/stdlib/src/kotlin/reflect/KCallable.kt @@ -19,5 +19,6 @@ public expect interface KCallable { * - property accessors: the getter for a property named "foo" will have the name "", * the setter, similarly, will have the name "". */ + @kotlin.internal.IntrinsicConstEvaluation public val name: String } diff --git a/libraries/stdlib/src/kotlin/text/Indent.kt b/libraries/stdlib/src/kotlin/text/Indent.kt index 0f860f1e192..4fa79995e96 100644 --- a/libraries/stdlib/src/kotlin/text/Indent.kt +++ b/libraries/stdlib/src/kotlin/text/Indent.kt @@ -22,6 +22,7 @@ package kotlin.text * @see trimIndent * @see kotlin.text.isWhitespace */ +@kotlin.internal.IntrinsicConstEvaluation public fun String.trimMargin(marginPrefix: String = "|"): String = replaceIndentByMargin("", marginPrefix) @@ -60,6 +61,7 @@ public fun String.replaceIndentByMargin(newIndent: String = "", marginPrefix: St * @see trimMargin * @see kotlin.text.isBlank */ +@kotlin.internal.IntrinsicConstEvaluation public fun String.trimIndent(): String = replaceIndent("") /** diff --git a/libraries/stdlib/src/kotlin/util/FloorDivMod.kt b/libraries/stdlib/src/kotlin/util/FloorDivMod.kt index e9c42b775fe..68248832c1c 100644 --- a/libraries/stdlib/src/kotlin/util/FloorDivMod.kt +++ b/libraries/stdlib/src/kotlin/util/FloorDivMod.kt @@ -14,6 +14,7 @@ import kotlin.math.sign /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Byte.floorDiv(other: Byte): Int = this.toInt().floorDiv(other.toInt()) @@ -24,12 +25,14 @@ public inline fun Byte.floorDiv(other: Byte): Int = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Byte.mod(other: Byte): Byte = this.toInt().mod(other.toInt()).toByte() /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Byte.floorDiv(other: Short): Int = this.toInt().floorDiv(other.toInt()) @@ -40,12 +43,14 @@ public inline fun Byte.floorDiv(other: Short): Int = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Byte.mod(other: Short): Short = this.toInt().mod(other.toInt()).toShort() /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Byte.floorDiv(other: Int): Int = this.toInt().floorDiv(other) @@ -56,12 +61,14 @@ public inline fun Byte.floorDiv(other: Int): Int = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Byte.mod(other: Int): Int = this.toInt().mod(other) /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Byte.floorDiv(other: Long): Long = this.toLong().floorDiv(other) @@ -72,12 +79,14 @@ public inline fun Byte.floorDiv(other: Long): Long = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Byte.mod(other: Long): Long = this.toLong().mod(other) /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Short.floorDiv(other: Byte): Int = this.toInt().floorDiv(other.toInt()) @@ -88,12 +97,14 @@ public inline fun Short.floorDiv(other: Byte): Int = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Short.mod(other: Byte): Byte = this.toInt().mod(other.toInt()).toByte() /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Short.floorDiv(other: Short): Int = this.toInt().floorDiv(other.toInt()) @@ -104,12 +115,14 @@ public inline fun Short.floorDiv(other: Short): Int = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Short.mod(other: Short): Short = this.toInt().mod(other.toInt()).toShort() /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Short.floorDiv(other: Int): Int = this.toInt().floorDiv(other) @@ -120,12 +133,14 @@ public inline fun Short.floorDiv(other: Int): Int = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Short.mod(other: Int): Int = this.toInt().mod(other) /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Short.floorDiv(other: Long): Long = this.toLong().floorDiv(other) @@ -136,12 +151,14 @@ public inline fun Short.floorDiv(other: Long): Long = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Short.mod(other: Long): Long = this.toLong().mod(other) /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Int.floorDiv(other: Byte): Int = this.floorDiv(other.toInt()) @@ -152,12 +169,14 @@ public inline fun Int.floorDiv(other: Byte): Int = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Int.mod(other: Byte): Byte = this.mod(other.toInt()).toByte() /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Int.floorDiv(other: Short): Int = this.floorDiv(other.toInt()) @@ -168,12 +187,14 @@ public inline fun Int.floorDiv(other: Short): Int = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Int.mod(other: Short): Short = this.mod(other.toInt()).toShort() /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Int.floorDiv(other: Int): Int { var q = this / other if (this xor other < 0 && q * other != this) q-- @@ -187,6 +208,7 @@ public inline fun Int.floorDiv(other: Int): Int { */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Int.mod(other: Int): Int { val r = this % other return r + (other and (((r xor other) and (r or -r)) shr 31)) @@ -195,6 +217,7 @@ public inline fun Int.mod(other: Int): Int { /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Int.floorDiv(other: Long): Long = this.toLong().floorDiv(other) @@ -205,12 +228,14 @@ public inline fun Int.floorDiv(other: Long): Long = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Int.mod(other: Long): Long = this.toLong().mod(other) /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Long.floorDiv(other: Byte): Long = this.floorDiv(other.toLong()) @@ -221,12 +246,14 @@ public inline fun Long.floorDiv(other: Byte): Long = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Long.mod(other: Byte): Byte = this.mod(other.toLong()).toByte() /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Long.floorDiv(other: Short): Long = this.floorDiv(other.toLong()) @@ -237,12 +264,14 @@ public inline fun Long.floorDiv(other: Short): Long = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Long.mod(other: Short): Short = this.mod(other.toLong()).toShort() /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Long.floorDiv(other: Int): Long = this.floorDiv(other.toLong()) @@ -253,12 +282,14 @@ public inline fun Long.floorDiv(other: Int): Long = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Long.mod(other: Int): Int = this.mod(other.toLong()).toInt() /** Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Long.floorDiv(other: Long): Long { var q = this / other if (this xor other < 0 && q * other != this) q-- @@ -272,6 +303,7 @@ public inline fun Long.floorDiv(other: Long): Long { */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Long.mod(other: Long): Long { val r = this % other return r + (other and (((r xor other) and (r or -r)) shr 63)) @@ -286,6 +318,7 @@ public inline fun Long.mod(other: Long): Long { */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Float.mod(other: Float): Float { val r = this % other return if (r != 0.0.toFloat() && r.sign != other.sign) r + other else r @@ -300,6 +333,7 @@ public inline fun Float.mod(other: Float): Float { */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Float.mod(other: Double): Double = this.toDouble().mod(other) @@ -312,6 +346,7 @@ public inline fun Float.mod(other: Double): Double = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Double.mod(other: Float): Double = this.mod(other.toDouble()) @@ -324,6 +359,7 @@ public inline fun Double.mod(other: Float): Double = */ @SinceKotlin("1.5") @kotlin.internal.InlineOnly +@kotlin.internal.IntrinsicConstEvaluation public inline fun Double.mod(other: Double): Double { val r = this % other return if (r != 0.0 && r.sign != other.sign) r + other else r diff --git a/libraries/stdlib/unsigned/src/kotlin/UByte.kt b/libraries/stdlib/unsigned/src/kotlin/UByte.kt index aed55a08f4b..0185ec405d6 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UByte.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UByte.kt @@ -13,7 +13,7 @@ import kotlin.jvm.* @SinceKotlin("1.5") @WasExperimental(ExperimentalUnsignedTypes::class) @JvmInline -public value class UByte @PublishedApi internal constructor(@PublishedApi internal val data: Byte) : Comparable { +public value class UByte @kotlin.internal.IntrinsicConstEvaluation @PublishedApi internal constructor(@PublishedApi internal val data: Byte) : Comparable { companion object { /** diff --git a/libraries/stdlib/unsigned/src/kotlin/UInt.kt b/libraries/stdlib/unsigned/src/kotlin/UInt.kt index 3f553eabf58..aeff9047529 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UInt.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UInt.kt @@ -13,7 +13,7 @@ import kotlin.jvm.* @SinceKotlin("1.5") @WasExperimental(ExperimentalUnsignedTypes::class) @JvmInline -public value class UInt @PublishedApi internal constructor(@PublishedApi internal val data: Int) : Comparable { +public value class UInt @kotlin.internal.IntrinsicConstEvaluation @PublishedApi internal constructor(@PublishedApi internal val data: Int) : Comparable { companion object { /** diff --git a/libraries/stdlib/unsigned/src/kotlin/ULong.kt b/libraries/stdlib/unsigned/src/kotlin/ULong.kt index 46949456a2c..63225a3fb69 100644 --- a/libraries/stdlib/unsigned/src/kotlin/ULong.kt +++ b/libraries/stdlib/unsigned/src/kotlin/ULong.kt @@ -13,7 +13,7 @@ import kotlin.jvm.* @SinceKotlin("1.5") @WasExperimental(ExperimentalUnsignedTypes::class) @JvmInline -public value class ULong @PublishedApi internal constructor(@PublishedApi internal val data: Long) : Comparable { +public value class ULong @kotlin.internal.IntrinsicConstEvaluation @PublishedApi internal constructor(@PublishedApi internal val data: Long) : Comparable { companion object { /** diff --git a/libraries/stdlib/unsigned/src/kotlin/UShort.kt b/libraries/stdlib/unsigned/src/kotlin/UShort.kt index 286cf5a58a8..cfb7d3fcfb3 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UShort.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UShort.kt @@ -13,7 +13,7 @@ import kotlin.jvm.* @SinceKotlin("1.5") @WasExperimental(ExperimentalUnsignedTypes::class) @JvmInline -public value class UShort @PublishedApi internal constructor(@PublishedApi internal val data: Short) : Comparable { +public value class UShort @kotlin.internal.IntrinsicConstEvaluation @PublishedApi internal constructor(@PublishedApi internal val data: Short) : Comparable { companion object { /**