comp.lang.ada
 help / color / mirror / Atom feed
From: "Adam Beneschan" <adam@irvine.com>
Subject: Re: Access to interface conversion problem
Date: 13 Mar 2007 15:32:51 -0700
Date: 2007-03-13T15:32:51-07:00	[thread overview]
Message-ID: <1173825171.351313.302580@o5g2000hsb.googlegroups.com> (raw)
In-Reply-To: <m21wjshngx.fsf@mac.com>

On Mar 13, 1:56 pm, Simon Wright <simon.j.wri...@mac.com> wrote:
> Judging by the result of compiling with -gnatdg (output intermediate
> form) and -gnata (assertions), the compiler seems to be complaining
> that Root_Implementation_Type isn't an interface. So I guess it's
> confused (which would explain the strange (lack of) error messages).
>
> Is this conversion of access values legal in Ada 95? if so -- live and
> learn!

No, converting from an access-to-classwide to an access-to-interface-
classwide type is not legal in Ada 95.  Mostly this is because there
ain't no interface types.  :)

There are special rules in Ada dealing with converting T1'Class to
T2'Class where either T1 or T2 is an interface type; see 4.6(23.1).

                               -- Adam






  reply	other threads:[~2007-03-13 22:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-13 15:25 Access to interface conversion problem msimonides
2007-03-13 16:06 ` Robert A Duff
2007-03-13 16:54   ` Adam Beneschan
2007-03-13 17:35     ` Robert A Duff
2007-03-13 20:56 ` Simon Wright
2007-03-13 22:32   ` Adam Beneschan [this message]
2007-03-14  9:06     ` msimonides
replies disabled

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