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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9dcaa9f073e2ef8f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!h12g2000pro.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Type in allocator has deeper level than designated class-wide type Date: Tue, 14 Jun 2011 09:01:31 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6c4421f7-0fbd-49d0-a108-429d542608a2@h12g2000pro.googlegroups.com> References: <9bf2ef73-5cc7-4863-90d7-2e2cf3bcd294@o10g2000prn.googlegroups.com> <92fb5bf2-f43e-4ac9-97eb-6092f10e5607@e17g2000prj.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1308067292 2701 127.0.0.1 (14 Jun 2011 16:01:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 14 Jun 2011 16:01:32 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h12g2000pro.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19824 Date: 2011-06-14T09:01:31-07:00 List-Id: On Jun 14, 1:01=A0am, Adrian Hoe wrote: > > But this defeats my implementation intention which the size and the > type of its data array can only be determined during runtime. Any > suggestion? There was no reason to change the generic parameters to High_Cloud, or to change the type of the Data component from Data_Array to Item. As I tried to explain, your problem had nothing to do with arrays. The problem has to do with where the Element_Record type extension is declared, which has to do with where the High_Cloud generic is instantiated. In your latest example, you instantiated it directly in a library package, Hen, so there won't be a problem. If you instantiate it inside a procedure, there will be a problem. But the types of the components don't matter. If it *does* make a difference---i.e. if declaring Data as a Data_Array instead of an Item makes things fail, even if High_Cloud is still instantiated directly inside Hen---then I believe the problem is with your compiler, and you need to contact your compiler vendor and file a bug report. -- Adam