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=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID, LOTS_OF_MONEY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,62ea712965950abb X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Ada tagged types not as powerful as C++ for dispatching??? Date: 1997/08/18 Message-ID: #1/1 X-Deja-AN: 264908134 References: <33F4D31F.6E511B93@mci.com> <01bcab6a$f2061820$92165da6@csp3610x> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-08-18T00:00:00+00:00 List-Id: In article <01bcab6a$f2061820$92165da6@csp3610x>, Troy Noble wrote: >The only difference between what you tried and what I tried >is that in my message on this newsgroup I put the definition >of Circle_Ptr INSIDE package Figures. In my non-working >code I had defined Circle_Ptr INSIDE my procedure >Test_Figures. That explains it. You can't convert from a more-nested access type to a less-nested one, because that could create dangling pointers. (There are ways to do it -- e.g. using Unchecked_Access, but it's usually best to just put the access types at library level.) >Do you think this is a bug in GNAT that I should report, >or was it in fact detecting the error properly? GNAT is correct to complain. - Bob