Is it safe to use objects from the kotlin.jvm.inte...
# getting-started
d
Is it safe to use objects from the kotlin.jvm.internal package? I'm writing an internal library for SOAP (yes!) testing and need casting to e.g.
FunctionReference
.
s
Since those classes aren't part of the public API, there are no guarantees about compatibility between versions. So if you use them, it's possible your code will break and need fixing each time you upgrade to a new Kotlin version.
d
I understand and it makes sense. I just wonder why those classes technically ARE public, i.e. why the
internal
modifier is not used.
Hmm, probably it's shared between moduless...
👌 1
c
Or possibly to allow them to be used from
inline
j
Or possibly to allow them to be used from inline
If that were the case, they could use
internal
and
@PublishedApi
, no need for public