From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: Ambiguous reference - What is wrong with this?
Date: Fri, 17 Aug 2001 12:34:59 -0400
Date: 2001-08-17T16:35:01+00:00 [thread overview]
Message-ID: <9ljh3l$g4l$1@nh.pace.co.uk> (raw)
In-Reply-To: x7v1ymdyhi0.fsf@smaug.pushface.org
I just tried this with Gnat 3.13p and it seemed to work The question in my
mind is will it do the thing I want it to do? I convert Object2 back to the
base type & presumably everything is fine if the lower level Some_Proc wants
to dynamically allocate something that matches. But have I prevented
something from entering that isn't of the more specific Derive1 type? If
converting back to the Base type finds a matching procedure, couldn't
something that is not of Derive1 type enter the Some_Proc?
In other words, if I'm using this to restrict some child type list from
having data values put into it that don't match some more complex derived
child class, am I not just circumventing that check?
MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas www.pacemicro.com
Enabling the digital revolution
e-Mail: marin.condic@pacemicro.com
Web: http://www.mcondic.com/
"Simon Wright" <simon@pushface.org> wrote in message
news:x7v1ymdyhi0.fsf@smaug.pushface.org...
> tmoran@acm.org writes:
>
> Root.Child1.Some_Proc (
> Object => Root.Child1.Derive1 (Object),
> Object2 => Root.Base'Class (Object2)) ;
>
> compiles OK (GNAT 3.14a)
prev parent reply other threads:[~2001-08-17 16:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-14 15:14 Ambiguous reference - What is wrong with this? Marin David Condic
2001-08-14 16:56 ` Warren W. Gay VE3WWG
2001-08-14 17:45 ` Warren W. Gay VE3WWG
2001-08-14 17:54 ` Marin David Condic
2001-08-14 19:24 ` Warren W. Gay VE3WWG
2001-08-14 17:44 ` Sergey Koshcheyev
2001-08-14 20:10 ` Marin David Condic
2001-08-15 7:38 ` Sergey Koshcheyev
2001-08-15 13:49 ` Marin David Condic
2001-08-14 20:02 ` tmoran
2001-08-15 6:17 ` Simon Wright
2001-08-17 16:34 ` Marin David Condic [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