From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Discriminant problem
Date: Mon, 30 Aug 2021 20:53:41 -0500 [thread overview]
Message-ID: <sgk236$drg$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: sgjkj4$kn4$1@dont-email.me
"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.
Randy.
next prev parent reply other threads:[~2021-08-31 1:53 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 [this message]
2021-09-09 19:51 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox