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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bb06c19745c6aacb,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!w36g2000vbi.googlegroups.com!not-for-mail From: "Prof. Dr. Carl Weierstrass" Newsgroups: comp.lang.ada Subject: Use of abstract tagged types without access types -- again and complete Date: Thu, 9 Jun 2011 10:50:12 -0700 (PDT) Organization: http://groups.google.com Message-ID: <53347692-e182-4f2f-8598-453af64e16fc@w36g2000vbi.googlegroups.com> NNTP-Posting-Host: 91.34.126.117 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1307641812 21573 127.0.0.1 (9 Jun 2011 17:50:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 9 Jun 2011 17:50:12 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w36g2000vbi.googlegroups.com; posting-host=91.34.126.117; posting-account=5zx--goAAAD06H29EnWQGKTO-gctuXHl User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:20689 Date: 2011-06-09T10:50:12-07:00 List-Id: Hi, I have a question to all Ada gurus: I want to do something like: package Test is type Parent_Type is new Ada.Finalization.Controlled with private; type Child_Type is abstract new Ada.Finalization.Controlled with private; type Child_Type_1 is new Child_Type with private; type Child_Type_N is new Child_Type with private; private type Parent_Type is new Ada.Finalization.Controlled with record Child : Child_Type'Class; end record; type Child_Type is abstract new Ada.Finalization.Controlled with null record; type Child_Type_1 is new Child_Type with null record; type Child_Type_N is new Child_Type with null record; end Test; This doesn't work, because: class-wide subtype with unknown discriminants in component declaration Of course I could use an access type to avoid the error but is there a way to do something like this without access types. Regards