From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d10596e187e90822,start X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Private Children Date: 1999/06/20 Message-ID: #1/1 X-Deja-AN: 491883673 NNTP-Posting-Date: Sun, 20 Jun 1999 15:35:07 PDT Newsgroups: comp.lang.ada Date: 1999-06-20T00:00:00+00:00 List-Id: Can a public child package with its private sibling? According to my compiler, the answer is no. When I try to compile the unit below (P.C2), I get the following error message: gcc -c -gnatc /home/matt/p-c2.ads p-c2.ads:1:06: current unit must also be private descendant of "P" Public child P.C2 only uses the entity provided by its private sibling P.C1 in its private region. What is the rationale for making this illegal? --STX package P is pragma Pure; end P; private package P.C1 is I1 : Integer; end P.C1; with P.C1; package P.C2 is I2 : Integer; private I3 : Integer := P.C1.I1; end P.C2;