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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,436e4ce138981b82 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-12 23:55:37 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!zeus.visi.com!news-out.visi.com!green.octanews.net!news-out.octanews.net!news.glorb.com!peer1.news.newnet.co.uk!peer1.news.newnet.co.uk!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: abstract sub programs overriding Date: 13 Mar 2004 07:51:45 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <5f59677c.0403021101.4ac263d0@posting.google.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1079164536 122 62.49.19.209 (13 Mar 2004 07:55:36 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 13 Mar 2004 07:55:36 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:6300 Date: 2004-03-13T07:51:45+00:00 List-Id: evangeli@cnam.fr (Evangelista Sami) writes: > ----------------------------- > type t1 is abstract tagged record ... end record; > procedure proc(my_t : in t1) is abstract; > > type t2 is abstract new t1 with record ... end record; > procedure proc(my_t : in t2); > > type t3 is new t2 with record ... end record; > type access_t3 is access all t3; > function new_t3 return access_t3; > ----------------------------- > > function new_t3 only create a t3 object and return it. Now i have this > procedure : > > ----------------------------- > procedure generate is > access_t3 : t3 := new_t3; > begin > proc(access_t3.all); > end; > ----------------------------- > > how is it that the "proc(access_t3.all);" call > raise "CONSTRAINT_ERROR : generator.adb:93 access check failed" > > i thought it would be correct since i have overriden proc for type t2 > and t3 inherits from t2. what's wrong? > what would be the solution? I have reported this problem to ACT, who have accepted it as a bug and fixed it in the development sources. I don't know when it will be available in a public release (I guess that now that means "in GCC"). -- Simon Wright 100% Ada, no bugs.