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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.103.199 with SMTP id fy7mr11861253obb.18.1401618243005; Sun, 01 Jun 2014 03:24:03 -0700 (PDT) X-Received: by 10.140.37.148 with SMTP id r20mr498871qgr.0.1401618242854; Sun, 01 Jun 2014 03:24:02 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!hl10no8402476igb.0!news-out.google.com!gi6ni19370igc.0!nntp.google.com!hw13no3346908qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 1 Jun 2014 03:24:02 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:51:4a18:f04c:f981:bde8:9d77:a916; posting-account=5zx--goAAAD06H29EnWQGKTO-gctuXHl NNTP-Posting-Host: 2003:51:4a18:f04c:f981:bde8:9d77:a916 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <33e17033-615d-43d4-8b47-9357c8875a10@googlegroups.com> Subject: Strange error message From: Charly Injection-Date: Sun, 01 Jun 2014 10:24:02 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:20100 Date: 2014-06-01T03:24:02-07:00 List-Id: Hi, when I defined a class hierarchy I encountered a problem, that I could reduce to the following few lines: This version compiles without problems: ----------------- package Test is type Base is tagged private; function Create return Base; type High is new Base with private; private type Base is tagged null record; type High is new Base with null record; end Test; ----------------- but this one ----------------- package Test is type Base is tagged private; function Create return Base; type High is new Base with private; private type Base is tagged null record; type High is new Base with record -- H_Val : Natural := 0; -- these lines are changed end record; -- end Test; ----------------- does not compile an I get an error: type must be declared abstract or "Create" overridden Why do I have to overide the function Create for type High. I don't see the necessity. Btw. I'm using GNAT GPL 2014 but the same happens with 2013 version. Charly