https://kotlinlang.org logo
Title
x

xenoterracide

05/17/2019, 7:53 PM
hmm…. https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.random/-random/index.html this is in Kotlin 1.2 from the looks of it, but I can’t seem to import Kotlin’s
Random
only
java.util.Random
, trying to call
Random.nextDouble
, I have
implementation(kotlin("stdlib-jdk8"))
d

Dennis L

05/17/2019, 7:55 PM
this is the standard library are you sure you're importing that
x

xenoterracide

05/17/2019, 7:57 PM
well whenever I try to import kotlin.reflect.Random intellij has other ideas and imports java.util.random, it’s acting like the stdlib version doesn’t exist
hmm… poking aroud idea’s view of the the jar I don’t see a kotlin.random in any of them
l

LeoColman

05/17/2019, 9:16 PM
it's not from kotlin.reflect
it's in the stdlib
x

xenoterracide

05/17/2019, 9:23 PM
in package kotlin.reflect
errrr
kotlin.random I mean
but when I look for kotlin.random in my 1.2.71 jars it’s not there
l

LeoColman

05/17/2019, 9:28 PM
I think it's a 1.3+ feature, isn't it?
i

ilya.gorbunov

05/17/2019, 11:08 PM
The entire class is marked with SinceKotlin(1.3) so it shouldn't be available in stdlib 1.2.71. The documentation page hides the class declaration itself, when version filter is applied, however its members are still visible. It looks like a bug, so I've filed it as https://youtrack.jetbrains.com/issue/KT-31483