comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Generic instantiation in client vs child package
Date: 1998/10/13
Date: 1998-10-13T00:00:00+00:00	[thread overview]
Message-ID: <F0s2E4.D1y.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 36234017.2AB1975B@lmco.com

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
: <Two more similar error blocks are also produced>

: 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




      reply	other threads:[~1998-10-13  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-13  0:00 Generic instantiation in client vs child package Marc A. Criley
1998-10-13  0:00 ` Tucker Taft [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox