You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Declare atomic variables as private val or internal val. You can use just (public) val, but make sure they are not directly accessed outside of your Kotlin module (outside of the source set). Access to the atomic variable itself shall be encapsulated.
It would be nice to have it explicitly stated whether this includes @PublishedApi internal declarations, and whether the answer changes if the declaration is only used by in-module inline functions.
My understanding is that it's OK to use as long as it's only used via in-module inline functions, because the inlining inlines the processed IR, which has had the transformations applied. But it would be nice to confirm that.