From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.Oh2LSLzxQ4+YU0Htrufc+A.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Having problems instantiating a child class with an extension aggregate Date: Mon, 27 Jan 2020 17:47:49 +0000 Organization: Aioe.org NNTP Server Message-ID: References: <79386e8a-20cb-4bcb-a60a-531919ee6976@googlegroups.com> NNTP-Posting-Host: Oh2LSLzxQ4+YU0Htrufc+A.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) Cancel-Lock: sha1:mGJqjEVY9aOh0vM292BLTTMC8FM= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:57963 Date: 2020-01-27T17:47:49+00:00 List-Id: b.mcguinness747@gmail.com writes: > result : APL_Data_Array_Pointer := new APL_Data_Array'( > g_shape => new Dimensions'(right.g_shape.all), > g_data => new Elements(right.g_data.all'Range) > ); > > This gives me an error message: > > apl_data_arrays.adb:180:36: type of aggregate has private ancestor "Controlled" > apl_data_arrays.adb:180:36: must use extension aggregate You need to include the private ancestor: ... new APL_Data_Array'(Controlled with ...