Fleshgrinder02/07/2020, 4:46 PM
to hide Kotlin functions from Java users, however, we have no equivalent
(or whatever it would be named) to hide definitions from Kotlin. I tried
but it's hidden in Java afterwards as well if you use IntelliJ. 😛 Any known workarounds for this or is a feature request the only possible thing?
@Deprecated("Java only", level = HIDDEN)
Fleshgrinder02/07/2020, 4:50 PM
Seems to be clearer, the suppression can be added as
@Suppress("ILLEGAL_KOTLIN_VERSION_STRING_VALUE") @SinceKotlin("Java only")
Mike02/07/2020, 5:08 PM
Otherwise, I'd also use the "Java only" version approach. I know it's unlikely this code will still be around when Kotlin 99999 is released, but...
Fleshgrinder02/07/2020, 5:16 PM
annotation is not inheritable. Meaning, if I create a
annotation I cannot give it the same semantics as
has it and the symbol will be visible in both Java and Kotlin. 😞 I'll create a feature request and PR for Kotlin, we need this. Maybe something like
since it might be useful for JS and native too.
but the symbols are still visible, it has to be
or similar (so a version string). 😞 I guess the only workaround here is to create a constant that says
and contains such a weird number.
Mike02/07/2020, 6:59 PM
marstran02/10/2020, 10:54 AM
Fleshgrinder02/10/2020, 11:09 AM