comp.lang.ada
 help / color / mirror / Atom feed
From: "cl1" <charles.w.lambert@gmail.com>
Subject: Re: generic package with procedure paramter gives "not subtype conformant with declaration"
Date: 1 Oct 2006 14:32:01 -0700
Date: 2006-10-01T14:32:01-07:00	[thread overview]
Message-ID: <1159738320.992327.75460@b28g2000cwb.googlegroups.com> (raw)
In-Reply-To: <wcclknzokmp.fsf@shell01.TheWorld.com>


Robert A Duff wrote:
> "cl1" <charles.w.lambert@gmail.com> writes:
>
> > Thank you very much.
> > It fixed the problem, but i do not understand why:
> > with procedure Av_Param_Instance(Av_List, Value : System.Address);
> > does not work. If anyone knows why, I would be greatfull for an
> > explination.
>
> And you wanted to do Av_Param_Instance'Access inside the generic?
>
> That won't work, because the compiler can't check the rules about
> X'Access, because it doesn't know enough about the actual parameter
> passed to Av_Param_Instance.  The accessibility rules come to mind.
> Also, the fact that you can't do X'Access if X is intrinsic.

Now that I know that is the rule, everything is clear once again. I had
made the assumption that it would work based on the definition in the
arm on how generic packages are elaborated. I love how Ada is so well
defined. Now if i could just memorize the ARM ... :-D


> 
> - Bob




      reply	other threads:[~2006-10-01 21:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-30 21:20 generic package with procedure paramter gives "not subtype conformant with declaration" cl1
2006-10-01  1:27 ` Jeffrey R. Carter
2006-10-01  6:02   ` cl1
2006-10-01 19:43     ` Jeffrey R. Carter
2006-10-01 21:26       ` cl1
2006-10-01 23:17         ` tmoran
2006-10-02  4:46           ` cl1
2006-10-02  3:24         ` Jeffrey R. Carter
2006-10-02  4:31           ` cl1
2006-10-02  7:17             ` Alex R. Mosteo
2006-10-02 20:04             ` Jeffrey R. Carter
2006-10-03 18:49               ` cl1
2006-10-01  7:18 ` Simon Wright
2006-10-01 19:42   ` cl1
2006-10-01 20:18     ` Robert A Duff
2006-10-01 21:32       ` cl1 [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