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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ce0900b60ca3f616 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-05 13:24:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!ihug.co.nz!out.nntp.be!propagator-SanJose!in.nntp.be!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <9rti6v$hcu$1@news.huji.ac.il> <1EyE7.10050$xS6.13527@www.newsranger.com> <9rue9f$j4t$1@nh.pace.co.uk> <9ruiet$kqg$1@nh.pace.co.uk> <3BE3235D.E292B890@boeing.com> <9s6a60$a49$1@nh.pace.co.uk> <9s6o5m$fsi$1@nh.pace.co.uk> Subject: Re: List container strawman Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Mon, 05 Nov 2001 16:23:25 EST Organization: http://www.newsranger.com Date: Mon, 05 Nov 2001 21:23:25 GMT Xref: archiver1.google.com comp.lang.ada:15859 Date: 2001-11-05T21:23:25+00:00 List-Id: In article <9s6o5m$fsi$1@nh.pace.co.uk>, Marin David Condic says... >So basically, you're saying that a library level generic that contained as >part of it a Controlled element, you'd be able to instantiate it in a >procedure (non-library level)? But if a data item in it is itself derived >from Controlled, you can't? (Seems kind of strange, but I'm sure there's >going to be some corner-case of the rules to explain it.) Yes. It isn't controlled per se. Its just that you can't declare a derived tagged type at a lower level than its parent, and Controlled is a tagged type. The rule goes for all tagged types. Its just that controlled was unfortunately implemented as a tagged type declared at the library level. >solution. So it would probably have to use something either convoluted >enough to fool the compiler into doing what you want, or it would need to do >something kind of "dirty" like using System.Address in the Controlled part >and doing some kind of access type to the generic parameter with a >conversion to address. (Kinky, but since it all remains hidden down in the >bowels of the implementation, probably not a hopelessly bad idea.) Any solution would have to have the library-level controlled type somehow know how to control the non-library-level type. If the controlled stuff isn't a generic parameter or dependent on one, there are (nasty) ways to do that. If it is, then you are just plain hosed (unless someone knows a neat trick I don't). --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.