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,328b479bac732fe2 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Measurements components(need language lawyer input) Date: 1996/03/20 Message-ID: #1/1 X-Deja-AN: 143282537 references: <4inncp$cr2@host-3.cyberhighway.net> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-03-20T00:00:00+00:00 List-Id: In article <4inncp$cr2@host-3.cyberhighway.net>, Mitchell E. James wrote: >generic > type t is private; >package p is > x:t; >end; > >-- This one gets the error: >generic > with package other is new p(<>); >package p.child is > y: other.t; >end p.child; > >-- this one doesn't: >with p; >generic > with package other is new p(<>); >package q is > y: other.t; >end q; I believe that's correct. When you're inside a generic package, the name of the generic package denotes the "current instance", which is a package, not a generic package. I'm too lazy to look up the RM reference for you right now, but I'm pretty sure it's somewhere in 8.6. Check "current instance" in the index. So, in the P.Child case, P is a package, not a generic package. A child is logically *inside* its parent's declarative region, even though it is physically separate. In the case of Q, you're not inside P, so referring to P refers to the generic package as usual. I'm curious: What were you trying to do by having a generic formal package that's an instance of the parent generic package? - Bob