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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1ed4b5bd91d02f0b X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: using an Ada.Container as a private type Date: Thu, 03 Apr 2008 12:00:24 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <42c84166-c7e4-42e0-b1bf-2104d3bb0cda@e10g2000prf.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1207238424 20762 192.74.137.71 (3 Apr 2008 16:00:24 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 3 Apr 2008 16:00:24 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:s5rQoxwrXBhLLtheUg858gqmY/M= Xref: g2news1.google.com comp.lang.ada:20782 Date: 2008-04-03T12:00:24-04:00 List-Id: Graham writes: > type Payment_Stream is new Payment_Stream_Package.Map; > > but I can't do this. Gnat complains that "type derived from tagged > type must have extension". > I'm fairly new to Ada but thought I was getting on top of it! What is > the principal that stops me doing this? What should I do instead? Not really a "principle" -- more like an arbitrary restriction. Map is tagged, and tagged types have to obey that rule. You should say: type Payment_Stream is new Payment_Stream_Package.Map with null record; to create an empty extension. - Bob