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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: I am leaving Ada :-( because of GNAT bugs Date: Mon, 11 Dec 2017 16:47:26 -0600 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Mon, 11 Dec 2017 22:47:27 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="29096"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:49451 Date: 2017-12-11T16:47:26-06:00 List-Id: "Simon Wright" wrote in message news:lyy3mctfad.fsf@pushface.org... > bj.mooremr@gmail.com writes: ... >> 9. In rdf-redland-query_results.ads, you declare a type derived from a >> tagged type, but then try to apply a Pre'Class aspect. This apparently >> is not legal, though the GPL 2016 compiler doesn't complain. I ran >> into this, with my own code, that GPL 2017 told me with a compiler >> error that the code was not legal. >> >> Pre'Class can only be applied to a root type apparently. > > See ARM 6.1.1(17.1/4), "Pre'Class shall not be specified for an > overriding primitive subprogram of a tagged type T unless the Pre'Class > aspect is specified for the corresponding primitive subprogram of some > ancestor of T." That was a rule change in the 2015 Corrigendum. It was made because the derived Pre'Class will be ored with the inherited one, and if you've inherited from a routine with no Pre'Class, you are oring with True -- which means your new Pre'Class will be completely ignored. Pre'Class makes sense mainly for a root class; one generally will use dispatching calls within it so it can adjust as needed for child types. If you need a precondition that doesn't fit into that model, you should use Pre (and be aware that you are violating the basic LSP approach). Randy.