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,dfdb3e9be36e818e,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.36.6 with SMTP id m6mr5169951pbj.4.1321902222034; Mon, 21 Nov 2011 11:03:42 -0800 (PST) Path: lh20ni2484pbb.0!nntp.google.com!news2.google.com!postnews.google.com!p2g2000vbj.googlegroups.com!not-for-mail From: Yukicanis Newsgroups: comp.lang.ada Subject: type access Parent'Class Date: Mon, 21 Nov 2011 11:03:36 -0800 (PST) Organization: http://groups.google.com Message-ID: <7fd768a4-f97b-4045-8bab-49d2a3897a61@p2g2000vbj.googlegroups.com> NNTP-Posting-Host: 93.208.169.211 Mime-Version: 1.0 X-Trace: posting.google.com 1321902220 20644 127.0.0.1 (21 Nov 2011 19:03:40 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 21 Nov 2011 19:03:40 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p2g2000vbj.googlegroups.com; posting-host=93.208.169.211; posting-account=PkAoygoAAABk9hjFSCyiskOHSFxak1Yv User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKUARELSC X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1,gzip(gfe) Xref: news2.google.com comp.lang.ada:14481 Content-Type: text/plain; charset=ISO-8859-1 Date: 2011-11-21T11:03:36-08:00 List-Id: Dear Group, I'm new to Ada and currently playing around with its OOP features. Now, I have the following source: procedure Test is type Parent is tagged limited null record; type Parent_Access is access Parent'Class; A : access Parent'Class; B : Parent_Access; procedure Dyn_Disp(X : access Parent'Class) is begin A := X; B := X; end Dyn_Disp; begin null; end Test; When I try to complie that with GNAT 4.6.1 I get the following error message: test.adb:9:10: expected type "Parent_Access" defined at line 3 test.adb:9:10: found type access to "Parent'Class" defined at line 6 which I don't really understand since type "Parent_Access" is type access to Parent'Class, isn't it? Thanks in advance.