Go to the first, previous, next, last section, table of contents.
-
The normal visibility rules do not apply within a parent_unit_name or a
context_clause, nor within a pragma that appears at the place of a
compilation unit. The special visibility rules for those contexts are
given here.
Static Semantics
-
Within the parent_unit_name at the beginning of a library_item, and
within a with_clause, the only declarations that are visible are those
that are library_items of the environment, and the only declarations
that are directly visible are those that are root library_items of the
environment. Notwithstanding the rules of See section 4.1.3 Selected Components, an expanded name
in a with_clause may consist of a prefix that denotes a generic package
and a selector_name that denotes a child of that generic package. (The
child is necessarily a generic unit; See section 10.1.1 Compilation Units - Library Units.)
-
Within a use_clause or pragma that is within a context_clause, each
library_item mentioned in a previous with_clause of the same
context_clause is visible, and each root library_item so mentioned is
directly visible. In addition, within such a use_clause, if a given
declaration is visible or directly visible, each declaration that occurs
immediately within the given declaration's visible part is also visible.
No other declarations are visible or directly visible.
-
Within the parent_unit_name of a subunit, library_items are visible as
they are in the parent_unit_name of a library_item; in addition, the
declaration corresponding to each body_stub in the environment is also
visible.
-
Within a pragma that appears at the place of a compilation unit, the
immediately preceding library_item and each of its ancestors is visible.
The ancestor root library_item is directly visible.
Go to the first, previous, next, last section, table of contents.