Yes.
The current rules are very simple and local - if something is marked as pub
(like S
in the first example), then it's considered public, if something is not marked as pub
(like S
in the second example), then it's not considered public.
S
being "effectively private" due to some intermediate private modules is not taken into account.
RFC 136 is the normative document.
Also see the discussion in [lang-team-minutes] private-in-public rules about tweaking the rules in various backward compatible ways.
1 Like