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: a07f3367d7,df12ee617a1ef887 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.72.73 with SMTP id b9mr12294272pav.9.1351704031553; Wed, 31 Oct 2012 10:20:31 -0700 (PDT) Received: by 10.68.230.33 with SMTP id sv1mr11561095pbc.18.1351704031536; Wed, 31 Oct 2012 10:20:31 -0700 (PDT) Path: 6ni51771pbd.1!nntp.google.com!kt20no27071178pbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 31 Oct 2012 10:20:31 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ NNTP-Posting-Host: 66.126.103.122 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4ef3d6d1-94e8-4b9e-8f80-c55da3bff811@googlegroups.com> Subject: Re: Child packages named Ada illegal? From: Adam Beneschan Injection-Date: Wed, 31 Oct 2012 17:20:31 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-10-31T10:20:31-07:00 List-Id: On Wednesday, October 31, 2012 9:47:04 AM UTC-7, Marius Amado-Alves wrote: > I was getting misleading <> errors from GNAT (the = packages were withen). In a moment of inspiration I renamed package AA.Lang= uages.Ada to AA.Languages.Ada_Languages and all went well. >=20 > Just curious: was GNAT misbehaving (unlikely) or is it somehow forbidden = to have child packages named Ada? >=20 Without seeing your exact code, it's hard to say for sure, but Shark8 is pr= obably right that it's a visibility issue. If you're inside AA.Languages.A= da, and you refer to the identifier Ada without any other qualification, th= en that identifier would refer to your child package, not the top level Ada= package. (Standard.Ada would still get you the top-level package.) The e= rror messages are confusing, though. I can understand it, because 99.9999%= of the time when a user uses one of the language-defined package names and= it isn't defined, it's because they forgot to WITH it; the GNAT people app= arently didn't think of this possibility, which is understandable. -- Adam