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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,becfcd482f73209e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-08 22:06:10 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!jussieu.fr!enst!enst.fr!not-for-mail From: Christoph Grein Newsgroups: comp.lang.ada Subject: Re: Trouble with renaming types Date: Wed, 9 May 2001 06:59:32 +0200 (MET DST) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Trace: avanie.enst.fr 989384769 66024 137.194.161.2 (9 May 2001 05:06:09 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 9 May 2001 05:06:09 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: Content-MD5: +e80E02dGFCysbM0a8pe9w== X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4u sparc Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.3 Precedence: bulk X-Reply-To: Christoph Grein List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: newsfeed.google.com comp.lang.ada:7351 Date: 2001-05-09T06:59:32+02:00 Bob, I'm not sure what you're about; your text is too brief and marred with errors: > WordSet(Dictionary, Word) I get the compilation error: I gather you mean WordSet.Add (Dictionary, Word); The problem is here that you qualify Add with the wrong prefix. Dictionary is not defined in WordSet but in some other parent (let's also call it Parent), and you must use the parent name as prefix: Parent.Add (Dictionary, Word); See the following example as further illustration: generic type Formal is private; package Gen is type Stuff is private; procedure Primitive (X: in Stuff); private type Stuff is record Comp: Formal; end record; end Gen; --------- with Gen; package Inst is new Gen (Formal => Integer); -- want to rename Inst.Stuff ---------- with Inst; package What_I_want is -- kind of renaming type Goal is new Inst.Stuff; -- implicitly inherits Primitive operations end What_I_want; ----------------- with What_I_want; procedure Main is X: What_I_want.Goal; begin What_I_want.Primitive (X); end Main; Christoph