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,e89eefbf1ca016b X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!news2.glorb.com!feeder.erje.net!feeder.news-service.com!cyclone03.ams2.highwinds-media.com!news.highwinds-media.com!npeersf02.ams.highwinds-media.com!newsfe11.ams2.POSTED!40385e62!not-for-mail From: Per Sandberg User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Discriminant & interface not implemented by full type References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@WWWSpace.NET NNTP-Posting-Date: Thu, 12 Mar 2009 06:23:46 UTC Date: Thu, 12 Mar 2009 07:21:08 +0100 Xref: g2news1.google.com comp.lang.ada:4056 Date: 2009-03-12T07:21:08+01:00 List-Id: Compiles fine with GNATPro 6.2.1 /Per Reto Buerki wrote: > Hi everyone, > > I have the following simple test application: > > package Full_View is > > type Base_Type (Num : Integer) is tagged private; > > type Base_Interface is interface; > > type New_Type is new Base_Type (Num => 11) and > Base_Interface with private; > > private > type Base_Type (Num : Integer) is tagged record > My_Number : Integer := Num; > end record; > > type New_Type is new Base_Type (Num => 11) and > Base_Interface with null record; > > end Full_View; > > Trying to compile this with gnat gcc 4.3 in Debian/Lenny results in the > following error: > full_view.ads:7:09: interface "Base_Interface" not implemented by full > type (RM-2005 7.3 (7.3/2)) > > When removing the (Num => 11) discrimant initialization or the > Base_Interface interface from the New_Type type extension, the code > compiles fine. > > Is this a compiler bug? Seems to me that the consistency check of the > partial and full view of a tagged type covering interfaces does not like > discriminants. > > Thanks for your help. > - reto