comp.lang.ada
 help / color / mirror / Atom feed
From: Andrea Taverna <a.tavs@hotmail.it>
Subject: Re: Visibility of package parameters in child packages
Date: Wed, 16 Dec 2009 08:54:27 -0800 (PST)
Date: 2009-12-16T08:54:27-08:00	[thread overview]
Message-ID: <9bbb16f2-9ff2-45a5-bafd-be4bf47ef064@t19g2000vbc.googlegroups.com> (raw)
In-Reply-To: 4b2902a7$0$7633$9b4e6d93@newsspool1.arcor-online.net

On 16 Dic, 16:54, Georg Bauhaus <rm.dash-bauh...@futureapps.de> wrote:
> Andrea Taverna schrieb:
>
>
>
> > On 16 Dic, 14:14, Georg Bauhaus <rm.dash-bauh...@futureapps.de> wrote:
> >> Andrea Taverna schrieb:
>
> >>> and the compiler replied
> >>> -----%<-----%<-----%<-----%<-----%<
> >>> ]# gnatmake main.adb
> >>> gcc -c main.adb
> >>> main.adb:9:05: instantiation error at parent-child.adb:6
> >>> main.adb:9:05: "F" is not visible (more references follow)
> >>> main.adb:9:05: instantiation error at parent-child.adb:6
> >>> main.adb:9:05: non-visible declaration at q.ads:3
> >>> gnatmake: "main.adb" compilation error
> >>> -----%<-----%<-----%<-----%<-----%<
> >>> Am I missing something?
> >> It's not a "use" issue I think.  P.F is marked invisible,
> >> too.
> > I'm not sure I understand you correctly here, however P.F *is*
> > visible, in fact the compiler stops complaining after prefixig P's
> > name to F.
>
> My mistake, sorry. (I had forgotton to prefix the other F.)
>
> Is the question then whether or not "use" of a generic
> formal package extends to the formal parameters of the
> generic formal package (a formal package with a (<>))?

Hmm... I know that they are already visible in Parent as soon as I add
the use-clause. The problem is whether I can "use" the generic formal
package in a child of the generic package of which is a parameter.The
fact the package itself is visible in every children of such package
would suggest that I could.

> My best guess would be to start from Ada 95 12.7(10),
> if that still applies, but I simply don't know, and I
> don't have my other compiler handy which might give a more
> detailed error message.
Please bear some patience, I'ma self-thaught newbie.
http://www.adapower.com/adapower1/rm95/arm95_187.html
In Ada95 12.7 there seems not to be anything relevant about such
problem. What does the "(10)" mean?

thanks

Andrea



  reply	other threads:[~2009-12-16 16:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15 19:28 Visibility of package parameters in child packages Andrea Taverna
2009-12-15 21:00 ` Georg Bauhaus
2009-12-16 11:50   ` Andrea Taverna
2009-12-16 13:14     ` Georg Bauhaus
2009-12-16 14:21       ` Andrea Taverna
2009-12-16 15:54         ` Georg Bauhaus
2009-12-16 16:54           ` Andrea Taverna [this message]
2009-12-16 18:54             ` Georg Bauhaus
2009-12-16 21:44               ` Adam Beneschan
2009-12-16 21:26             ` sjw
2009-12-17  0:19     ` Randy Brukardt
2009-12-17 18:50       ` Ludovic Brenta
2009-12-16 21:27 ` Adam Beneschan
replies disabled

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