louiscad
06/30/2022, 11:39 PMprivate val useMe
that you access in public fun callMe(…)
, if you want to make callMe
inline
, you are forced to change useMe
visibility to internal
and add the @PublishedApi
, which has the unintended effect of letting useMe
be accessed outside the file where it resides along with callMe
. I don't like to leave that door open as the intention is poorly communicated IMHO.
Here's my proposal: allow @PublishedApi
to target private
symbols.
The API would still be published, and tools like kotlinx api validator would need to take it into account, but it'd avoid exposing something in a module where it's only intended to be used in a file. What do you think?