From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Visibility of package parameters in child packages
Date: Wed, 16 Dec 2009 14:14:42 +0100
Date: 2009-12-16T14:14:43+01:00 [thread overview]
Message-ID: <4b28dd43$0$6586$9b4e6d93@newsspool3.arcor-online.net> (raw)
In-Reply-To: <02e4d172-0eb9-4c2a-ac0f-68e151916d59@o19g2000vbj.googlegroups.com>
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. Can you try this:
generic
with package P is new Q(<>);
use P;
package Parent is
function P_F(X : P.T) return P.T
renames P.F;
and then call P_F in place of F.
I think it has (remotely?) to do with an issue hat Eric Hughes
had with Ada formal packages when trying C++ patterns;
IIRC, it was not reported to the producers of the compiler.
Also, there seems to have been some change in Ada 2005 LRM
12.7 from Ada 95 around the (<>) of a generic formal package,
but I don't know whether that is matters here.
next prev parent reply other threads:[~2009-12-16 13:14 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 [this message]
2009-12-16 14:21 ` Andrea Taverna
2009-12-16 15:54 ` Georg Bauhaus
2009-12-16 16:54 ` Andrea Taverna
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