From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3e5147bcbe0e25dc X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!o5g2000hsb.googlegroups.com!not-for-mail From: "Adam Beneschan" Newsgroups: comp.lang.ada Subject: Re: Access to interface conversion problem Date: 13 Mar 2007 15:32:51 -0700 Organization: http://groups.google.com Message-ID: <1173825171.351313.302580@o5g2000hsb.googlegroups.com> References: <1173799509.497206.119820@q40g2000cwq.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1173825173 25789 127.0.0.1 (13 Mar 2007 22:32:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 13 Mar 2007 22:32:53 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: o5g2000hsb.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news1.google.com comp.lang.ada:14527 Date: 2007-03-13T15:32:51-07:00 List-Id: On Mar 13, 1:56 pm, Simon Wright 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