- 7.a
- Reason: The exception echoes the similar exception for "immediate scope (of a declaration)" (see 8.2). It makes use_clauses work like this:
- 7.b
- package P is
type T is range 1..10;
end P;
- 7.c
- with P;
package Parent is
private
use P;
X : T;
end Parent;
- 7.d
- package Parent.Child is
Y : T; --Illegal!
Z : P.T;
private
W : T;
end Parent.Child;
- 7.e
- The declaration of Y is illegal because the scope of the "use P" does not include that place, so T is not directly visible there. The declarations of X, Z, and W are legal.