comp.lang.ada
 help / color / mirror / Atom feed
From: Jeremiah <jeremiah.breeden@gmail.com>
Subject: Re: Incomplete types used with generics
Date: Tue, 12 May 2015 16:19:01 -0700 (PDT)
Date: 2015-05-12T16:19:01-07:00	[thread overview]
Message-ID: <783ee7a2-e831-4e64-b736-abab0c7d71b7@googlegroups.com> (raw)
In-Reply-To: <mitsgs$1b2$1@loke.gir.dk>

On Tuesday, May 12, 2015 at 5:49:18 PM UTC-4, Randy Brukardt wrote:
> >> What am I missing?
> 
> That you didn't use an incomplete formal type, so OF COURSE the compiler 
> rejected your instantiation with an incomplete type. Sorry about missing 
> that yesterday; I was so excited that someone would actually try to use an 
> incomplete formal that I failed to notice that you didn't actually do so. 
> One does not think clearly when you are gloating. :-)
> 
>                                         Randy.

Do I at least get points for "trying" to use an incomplete formal?

Thanks for the explanation.  That makes better sense to me.  I didn't realize private types couldn't be incomplete types (I'm sure I read it in the RM, but I tend to learn better through trial/error then rereading than simply first pass reading).  

I've always seen the use limited private on generic parameters in most examples and tutorials.  Does removing the "limited private" from the generic parameters prevent me from having certain kinds of input types?  

I.E. does

generic
   type Item_Type(<>) is tagged limited private;

VS 

generic
   type Item_Type(<>) is tagged;

prevent me from using any specific types as input types to the package?  

  reply	other threads:[~2015-05-12 23:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 22:37 Incomplete types used with generics Jeremiah
2015-05-12  1:43 ` Randy Brukardt
2015-05-12  7:33   ` Simon Wright
2015-05-12 11:48     ` Jeremiah
2015-05-12 11:46   ` Jeremiah
2015-05-12 21:49 ` Randy Brukardt
2015-05-12 23:19   ` Jeremiah [this message]
2015-05-14  1:14     ` Randy Brukardt
2015-05-14 20:48       ` Jeremiah
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox