From: Simon Wright <simon@pushface.org>
Subject: Re: Discriminant problem
Date: Thu, 09 Sep 2021 20:51:39 +0100 [thread overview]
Message-ID: <lyilz9bk8k.fsf@pushface.org> (raw)
In-Reply-To: sgk236$drg$1@franka.jacob-sparre.dk
"Randy Brukardt" <randy@rrsoftware.com> writes:
> "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org> wrote in message
> news:sgjkj4$kn4$1@dont-email.me...
>> On 8/29/21 8:51 PM, Simon Wright wrote:
>>>
>>> the compiler says
>>>
>>> value for discriminant "Node_Test" must be static
>>> non-static function call (RM 4.9(6,18))
>>
>> This has always been the rule for aggregates.
>
> But Ada 202x relaxes it slightly. If the expression has a static
> nominal subtype, and every value in the subtype selects the same
> variant, then a dynamic discriminant is allowed in a aggregate. I
> don't know if that is what is happening here or not; this relaxation
> doesn't come up that often.
That's exactly what's happening here.
prev parent reply other threads:[~2021-09-09 19:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-29 18:51 Discriminant problem Simon Wright
2021-08-30 8:13 ` Simon Wright
2021-08-30 22:03 ` Jeffrey R. Carter
2021-08-31 1:53 ` Randy Brukardt
2021-09-09 19:51 ` Simon Wright [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