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,db89bfa77eeb251c,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!proxad.net!nerim.net!oleane.net!oleane!jussieu.fr!u-psud.fr!not-for-mail From: Philippe Tarroux Newsgroups: comp.lang.ada Subject: Dot notation in Ada 2005 Date: Fri, 19 May 2006 12:14:05 +0200 Organization: University Paris-Sud, France. Message-ID: NNTP-Posting-Host: osiris.limsi.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: upsn250.cri.u-psud.fr 1148033506 18477 129.175.157.197 (19 May 2006 10:11:46 GMT) X-Complaints-To: newsmaster@u-psud.fr NNTP-Posting-Date: Fri, 19 May 2006 10:11:46 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.8) Gecko/20050511 X-Accept-Language: fr, en Xref: g2news2.google.com comp.lang.ada:4304 Date: 2006-05-19T12:14:05+02:00 List-Id: I am testing some features of the new Ada 2005 version. Here a simple problem that seems to me rather a gnat bug than a limitation of the norm. With the code: ------ package Objs is type Point is tagged null record; end Objs; ------ package Objs.ext_objs is type New_Point is new Point With private; function X (P : New_Point) return Integer; private type New_Point is new Point with record X1, Y1 : Integer := 0; end record; end Objs.ext_objs; ------ package body Objs.Ext_Objs is function X (P : New_Point) return Integer is begin return P.X1; end X; procedure Test ( A : Integer; Y : Integer) is begin null; end Test; procedure Draw (A : Integer; P : New_Point) is begin Test (A, P.X); -- PROBLEM HERE end Draw; end Objs.Ext_Objs; i get a compilation error ("no selector X for private type P") when P.X is not the first argument of the function Test. It seems to me a rather strange behavior. Some explanation? Philippe Tarroux