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-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE, XPRIO autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Aggregate with derived types. Date: Sat, 16 Sep 2023 01:39:57 -0500 Organization: A noiseless patient Spider Message-ID: References: Injection-Date: Sat, 16 Sep 2023 06:39:34 -0000 (UTC) Injection-Info: dont-email.me; posting-host="1cae056933789323815d911d86a9da8e"; logging-data="3872685"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18z7AA/pumV3M8fKCL9vconXeQXUreicis=" Cancel-Lock: sha1:RDZi9Z4q3MmjxrwHw11xCh9vJCU= X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MSMail-Priority: Normal X-Priority: 3 Xref: news.eternal-september.org comp.lang.ada:65662 List-Id: "Blady" wrote in message news:udvooj$2oveh$1@dont-email.me... ... > I wonder why the float list aggregate isn't inferred by the compiler and > need some help with a qualification. The language rule is that the ancestor_part of an extension aggregate is expected to be of "any tagged type" (see 4.3.2(4/2)). An aggregate needs to have a single specific type, and "any tagged type" is not that. The reason that the ancestor is "any tagged type" is that the type of the ancestor determines the extension components needed along with other legality rules. One could imagine a language where all of these things are decided simulateously, but people worried that the complexity would make it difficult/impossible to implement. So aggregates are essentially black boxes whose type has to be determinable from the outside, and similar rules exist for parts inside the aggregate. Randy.