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.99.114.3 with SMTP id n3mr11350105pgc.140.1480375533489; Mon, 28 Nov 2016 15:25:33 -0800 (PST) X-Received: by 10.157.17.167 with SMTP id v36mr741917otf.12.1480375533412; Mon, 28 Nov 2016 15:25:33 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!p16no2589480qta.1!news-out.google.com!j8ni10833qtc.0!nntp.google.com!p16no2589475qta.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 28 Nov 2016 15:25:33 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:191:8303:2100:5985:2c17:9409:aa9c; posting-account=fdRd8woAAADTIlxCu9FgvDrUK4wPzvy3 NNTP-Posting-Host: 2601:191:8303:2100:5985:2c17:9409:aa9c References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Generic private type declaration From: Robert Eachus Injection-Date: Mon, 28 Nov 2016 23:25:33 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:32500 Date: 2016-11-28T15:25:33-08:00 List-Id: On Friday, November 25, 2016 at 12:36:26 PM UTC-5, Alejandro R. Mosteo wrot= e: > Hello, >=20 > I need some eyes on this error because I'm missing something basic. When= =20 > compiling this code: Try this:=20 procedure B001_Tagged is generic type X is private; package Untagged is type Y is private; private=20 type Y is new X; end Untagged; =20 package Ok is new Untagged (Integer); type Void is tagged null record; package Err is new Untagged (Void); -- Error here =20 begin null; end; GNAT 6.1.1 seems to like it, and I don't see any reason it shouldn't. Of c= ourse, type Y is tagged inside the generic and untagged outside. If you as= sign a value of type Y or a child to a globally visible object of type X, i= t should work--but I certainly won't guarantee it unless tested.