From 5550dc93a15cef29af809d943d1d6a71d427f9e6 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Fri, 19 Jun 2020 00:31:17 +0300 Subject: [PATCH] Remove hidden Random.Companion It was never released as stable since 1.3. Was provided for binary compatibility with 1.3 prereleases. --- libraries/stdlib/src/kotlin/random/Random.kt | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/libraries/stdlib/src/kotlin/random/Random.kt b/libraries/stdlib/src/kotlin/random/Random.kt index b93b91dab77..823c69a8133 100644 --- a/libraries/stdlib/src/kotlin/random/Random.kt +++ b/libraries/stdlib/src/kotlin/random/Random.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -261,16 +261,6 @@ public abstract class Random { override fun nextBytes(array: ByteArray): ByteArray = defaultRandom.nextBytes(array) 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) } }