From: Robert Eachus <rieachus@comcast.net>
Subject: Re: Generic private type declaration
Date: Mon, 28 Nov 2016 15:25:33 -0800 (PST)
Date: 2016-11-28T15:25:33-08:00 [thread overview]
Message-ID: <d3f3201e-cdeb-4eb1-bf46-ad5a03b85287@googlegroups.com> (raw)
In-Reply-To: <o19sod$ug2$1@dont-email.me>
On Friday, November 25, 2016 at 12:36:26 PM UTC-5, Alejandro R. Mosteo wrote:
> Hello,
>
> I need some eyes on this error because I'm missing something basic. When
> compiling this code:
Try this:
procedure B001_Tagged is
generic
type X is private;
package Untagged is
type Y is private;
private
type Y is new X;
end Untagged;
package Ok is new Untagged (Integer);
type Void is tagged null record;
package Err is new Untagged (Void); -- Error here
begin
null;
end;
GNAT 6.1.1 seems to like it, and I don't see any reason it shouldn't. Of course, type Y is tagged inside the generic and untagged outside. If you assign a value of type Y or a child to a globally visible object of type X, it should work--but I certainly won't guarantee it unless tested.
prev parent reply other threads:[~2016-11-28 23:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-25 17:36 Generic private type declaration Alejandro R. Mosteo
2016-11-25 19:17 ` Dmitry A. Kazakov
2016-11-28 14:54 ` Alejandro R. Mosteo
2016-11-25 19:18 ` AdaMagica
2016-11-28 14:57 ` Alejandro R. Mosteo
2016-11-25 19:38 ` G.B.
2016-11-26 8:45 ` Jacob Sparre Andersen
2016-11-26 19:18 ` Tero Koskinen
2016-11-28 15:05 ` Alejandro R. Mosteo
2016-11-28 21:32 ` Randy Brukardt
2016-11-29 11:12 ` Alejandro R. Mosteo
2016-11-29 11:42 ` Dmitry A. Kazakov
2016-11-29 23:48 ` Randy Brukardt
2016-11-28 23:25 ` Robert Eachus [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox