Deprecate js Math.random and provide replacement with Random.nextDouble

#KT-23564 Fixed
This commit is contained in:
Ilya Gorbunov
2018-07-18 17:14:38 +03:00
parent 402f8880a9
commit db7f4bb402
5 changed files with 3 additions and 9 deletions
@@ -11,8 +11,5 @@ public actual fun assertTypeEquals(expected: Any?, actual: Any?) {
assertEquals(expected?.let { it::class.js }, actual?.let { it::class.js })
}
@Suppress("DEPRECATION")
public actual fun randomInt(limit: Int): Int = (kotlin.js.Math.random() * limit).toInt()
@Suppress("NOTHING_TO_INLINE")
internal actual inline fun String.removeLeadingPlusOnJava6(): String = this