comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Raise expressions from AARM.
Date: Mon, 26 Feb 2024 22:01:23 +0200	[thread overview]
Message-ID: <l4490jF67e6U1@mid.individual.net> (raw)
In-Reply-To: <urf805$1qfpk$2@dont-email.me>

On 2024-02-25 13:23, Blady wrote:
> Le 24/02/2024 à 11:39, Niklas Holsti a écrit :
>> The point of these examples (which are only in the discussion 
>> annotation, not in the normative standard) is to discuss what is 
>> syntactically legal and why. The examples need not make practical sense.
> 
> Well, despite I knew that, I wanted to draw some use cases from them.
> For instance:
>    A : A_Tagged   := (Some_Tagged'(raise TBD_Error) with Comp => 'A');
> It will raise TBD_Error if Some_Tagged is not a null record, good to 
> know, isn't it?


Hm, not raising the exception for a null record seems weird to me, and I 
cannot deduce it from the RM. Moreover, for a plain qualified expression

    Some_Tagged'(raise TBD_Error)

not in an extension aggregate GNAT raises the exception even if the type 
is a null record. I suspect that not raising the exception for an 
extension aggregate where the ancestor type is a null record is a bug in 
GNAT.

      reply	other threads:[~2024-02-26 20:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-24  9:50 Raise expressions from AARM Blady
2024-02-24 10:39 ` Jeffrey R.Carter
2024-02-25 11:09   ` Blady
2024-02-24 10:39 ` Niklas Holsti
2024-02-25 11:23   ` Blady
2024-02-26 20:01     ` Niklas Holsti [this message]
replies disabled

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