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, WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,37d92c79f7959c1f X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Generic instantiation in client vs child package Date: 1998/10/13 Message-ID: #1/1 X-Deja-AN: 400696578 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <36234017.2AB1975B@lmco.com> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1998-10-13T00:00:00+00:00 List-Id: Marc A. Criley (marc.a.criley@lmco.com) wrote: : The following behavior is seen with GNAT 3.11b-beta on : Linux 2.0.33 (COL 1.2). : When instantiating a particular generic from Corey Minyard's "Ada : Structured Library" (http://www.concentric.net/~Minyard) I get a : clean compile in one situation and an error in another, and I'm : not sure why. I expect it's something I'm overlooking in Ada 95. : ... This sounds like a compiler bug. Because of the generic contract model, errors that occur during instantiation should always be suspect... : Given a simple package spec: : -- plain.ads : package Plain is : type P is private; : private : type P is new Integer; : end Plain; : ... : -- plain-list.ads : with ASGC.List.Dynamic; : package Plain.List is : package P_Container is new ASGC(Contained_Type => P, : "=" => "="); : package P_List is new P_Container.List; : package P_List_Dyn is new P_List.Dynamic; : end Plain.List; : I get this error: : plain-list.ads:9:04: instantiation error at asgc-list-dynamic.ads:26 : plain-list.ads:9:04: "Object" not declared in "List" : plain-list.ads:9:04: instantiation error at asgc-list-dynamic.ads:27 : plain-list.ads:9:04: tagged type required, found type "Object" defined at : asgc-list-dynamic.ads:26, instance at line 9 : : Marc A. Criley : Chief Software Architect : Lockheed Martin ATWCS : marc.a.criley@lmco.com : Phone: (610) 354-7861 : Fax : (610) 354-7308 -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA An AverStar Company