I am missing `UByte.toString(radix)` . Was that fo...
# stdlib
u
I am missing 
UByte.toString(radix)
 . Was that forgotten? Or is it missing intentionally? (Kotlin 1.5.10)
h
I don't know, maybe open a ticket? youtrack It's implemented as
toInt().toString()
anyway, so the workaround is easy.
h
😄
(yes, I also only looked in UByte.kt)
u
I need to set @OptIn(ExperimentalUnsignedTypes::class). I found two type infos: UStrings.kt
Copy code
@SinceKotlin("1.5")
@WasExperimental(ExperimentalUnsignedTypes::class)
//@kotlin.internal.InlineOnly
public /*inline*/ fun UShort.toString(radix: Int): String = this.toInt().toString(radix)
UStringsKt.kotlin_metadata
Copy code
@kotlin.SinceKotlin @kotlin.WasExperimental public fun kotlin.UByte.toString(radix: <http://kotlin.Int|kotlin.Int>): kotlin.String { /* compiled code */ }
But I would not have expected WasExperimental to be an issue
i
Do you have maybe languageVersion/apiVersion set to 1.4? It may restrict the availability of these functions because they are marked as stable since 1.5. Though they should be visible in earlier versions with that opt-in.
u
no languageVersion/apiVersion in gradle. But the kotlin 1.4.32 plugin seems to default to 1.4 and 1.4.32 is the latest stable plugin one for intellij. I was not aware of that. Setting languageVersion/apiVersion in IntelliJ fixed the issue.
Thanks
h
u
Even when I go to the preview channel:
🤔 1
Thats IntelliJ EAP. So maybe I am getting off topic here 🙂 Thanks for enlightening me.
Yes, no 1.5.10 Plugin for 2021.2 in the link posted above, no 212-1.5.10-xxx yet. Guess I have to wait.