From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,XPRIO autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Discriminant problem Date: Mon, 30 Aug 2021 20:53:41 -0500 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Tue, 31 Aug 2021 01:53:43 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="14192"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:62590 List-Id: "Jeffrey R. Carter" 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.