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,162ee844b6e6caa1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed.mathworks.com!nntp-out.monmouth.com!newspeer.monmouth.com!HSNX.atgi.net!cyclone-sf.pbi.net!216.218.192.242!news.he.net!newsfeed1.easynews.com!easynews.com!easynews!easynews-local!news.easynews.com.POSTED!not-for-mail From: A. Imran Newsgroups: comp.lang.ada Subject: Re: Odd error with access to derived types Message-ID: References: X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@easynews.com Organization: EasyNews, UseNet made Easy! X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly. Date: Sat, 16 Oct 2004 00:30:58 GMT Xref: g2news1.google.com comp.lang.ada:5298 Date: 2004-10-16T00:30:58+00:00 List-Id: Thank you for looking at the code. Here is the error message: ~> gnatmake test gcc -c test.adb parent-child.ads:10:09: "derived_access" conflicts with declaration at line 6 gnatmake: "test.adb" compilation error Relevant lines from parent-child.ads: 6 type derived_access is access all derived_type; 10 type derived_type is new base_type with record 11 dummy : boolean; 12 end record; Complete code: package parent is task type a_task; type base_type is abstract tagged limited record dummy_task : a_task; end record; end parent; package parent.child is type derived_type is new base_type with private; type derived_access is access all derived_type; private type derived_type is new base_type with record dummy : boolean; end record; end parent.child; The driver I use to compile the code: with parent; with parent.child; procedure test is begin null; end test;