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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.50.50.130 with SMTP id c2mr2072581igo.4.1406291759764; Fri, 25 Jul 2014 05:35:59 -0700 (PDT) X-Received: by 10.140.88.85 with SMTP id s79mr6148qgd.18.1406291759729; Fri, 25 Jul 2014 05:35:59 -0700 (PDT) Path: border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!h18no7351719igc.0!news-out.google.com!j6ni12934qas.0!nntp.google.com!v10no2444170qac.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 25 Jul 2014 05:35:59 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=91.55.222.226; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 91.55.222.226 References: <1cb91e6a-9e49-4bc8-bf4a-67a16a00e3a0@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Rationale for this not to compile? From: AdaMagica Injection-Date: Fri, 25 Jul 2014 12:35:59 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.dca.giganews.com comp.lang.ada:187856 Date: 2014-07-25T05:35:59-07:00 List-Id: generic type T; -- an incomplete type package Gen is end Gen; An incomplete type is - ahem - incomplete, the compiler does not and cannot know anything about it. It must later be completed somewhere in the code. Thus very little can be done in the body of the generic with an incomplete type (e.g. no assignment). It's like type T; type T_Ptr is access T; type T is ... generic type T is private; -- a private type package Gen is end Gen; The compiler may make assumptions about the type, e.g. object declaration and assignment are possible.