comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: GNAT bug with assertions
Date: Mon, 13 Aug 2018 10:07:27 +0100
Date: 2018-08-13T10:07:27+01:00	[thread overview]
Message-ID: <ly36viocs0.fsf@pushface.org> (raw)
In-Reply-To: e9c02e55-50ac-41a8-adb0-030dbccc777c@googlegroups.com

AdaMagica <christ-usch.grein@t-online.de> 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.


  reply	other threads:[~2018-08-13  9:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-10 10:29 GNAT bug with assertions AdaMagica
2018-08-10 14:23 ` Anh Vo
2018-08-10 15:16 ` Jacob Sparre Andersen
2018-08-10 16:16   ` Simon Wright
2018-08-10 20:42     ` Randy Brukardt
2018-08-12 18:35       ` AdaMagica
2018-08-12 18:51         ` Simon Wright
2018-08-13  9:03           ` AdaMagica
2018-08-13  9:07             ` Simon Wright [this message]
2018-08-13 15:54               ` Simon Wright
2018-08-13 16:55                 ` Simon Wright
2018-08-14  2:37                 ` AdaMagica
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox