Rename Random companion object to Default
#KT-27508
This commit is contained in:
@@ -237,7 +237,7 @@ public abstract class Random {
|
||||
*
|
||||
* @sample samples.random.Randoms.defaultRandom
|
||||
*/
|
||||
companion object : Random() {
|
||||
companion object Default : Random() {
|
||||
|
||||
private val defaultRandom: Random = defaultPlatformRandom()
|
||||
|
||||
@@ -262,6 +262,15 @@ public abstract class Random {
|
||||
override fun nextBytes(size: Int): ByteArray = defaultRandom.nextBytes(size)
|
||||
override fun nextBytes(array: ByteArray, fromIndex: Int, toIndex: Int): ByteArray = defaultRandom.nextBytes(array, fromIndex, toIndex)
|
||||
|
||||
@Deprecated("Use Default companion object instead", level = DeprecationLevel.HIDDEN)
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
@kotlin.jvm.JvmField
|
||||
public val Companion: Random.Companion = Random.Companion
|
||||
}
|
||||
|
||||
@Deprecated("Use Default companion object instead", level = DeprecationLevel.HIDDEN)
|
||||
public object Companion : Random() {
|
||||
override fun nextBits(bitCount: Int): Int = Default.nextBits(bitCount)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -3695,6 +3695,7 @@ public final class kotlin/random/PlatformRandomKt {
|
||||
|
||||
public abstract class kotlin/random/Random {
|
||||
public static final field Companion Lkotlin/random/Random$Companion;
|
||||
public static final field Default Lkotlin/random/Random$Default;
|
||||
public fun <init> ()V
|
||||
public abstract fun nextBits (I)I
|
||||
public fun nextBoolean ()Z
|
||||
@@ -3715,6 +3716,11 @@ public abstract class kotlin/random/Random {
|
||||
}
|
||||
|
||||
public final class kotlin/random/Random$Companion : kotlin/random/Random {
|
||||
public static final field INSTANCE Lkotlin/random/Random$Companion;
|
||||
public fun nextBits (I)I
|
||||
}
|
||||
|
||||
public final class kotlin/random/Random$Default : kotlin/random/Random {
|
||||
public fun nextBits (I)I
|
||||
public fun nextBoolean ()Z
|
||||
public fun nextBytes (I)[B
|
||||
|
||||
Reference in New Issue
Block a user