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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GNAT bug with assertions Date: Mon, 13 Aug 2018 10:07:27 +0100 Organization: A noiseless patient Spider Message-ID: References: <87y3dejlq9.fsf@adaheads.home> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="3a9bc8da2b28cb09207c678bdb07b736"; logging-data="1870"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LRKLiFryyQq8SrGhLvqOPjXqYLVSBF64=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:i9GPzEnzEbBR+Swg2miQX0x3eSI= sha1:fBQI++G1HDg7YKOgXRjiC3ON9gs= Xref: reader02.eternal-september.org comp.lang.ada:54159 Date: 2018-08-13T10:07:27+01:00 List-Id: AdaMagica writes: > Am Sonntag, 12. August 2018 20:51:51 UTC+2 schrieb Simon Wright: >> AdaMagica writes: >> >> > Thank you all for your time to think about this. >> > >> > I'll send it in to AdaCore. Hopefully it will be correted next year >> > in the public version. >> >> This is a somewhat artificial error, isn't it? >> >> function Maybe (X : Priv) return Subt; >> ... >> function Maybe (X : Priv) return Subt is (X); >> ... >> X := Maybe (C); -- C is -1 >> >> works as we would have expected. > > What is it that you expect here? What type is X? I didn't try with > GNAT, but I would expect Maybe (C) to raise Assertion_Error > independently of X. Oh come on! these are additions to the example that *you* posted upthread.