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 2002:a02:4a56:: with SMTP id k83-v6mr1759080jab.39.1532124420921; Fri, 20 Jul 2018 15:07:00 -0700 (PDT) X-Received: by 2002:aca:c6ca:: with SMTP id w193-v6mr41715oif.1.1532124420730; Fri, 20 Jul 2018 15:07:00 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.linkpendium.com!news.linkpendium.com!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!g2-v6no2086513itf.0!news-out.google.com!l67-v6ni3437itl.0!nntp.google.com!d7-v6no2127094itj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 20 Jul 2018 15:07:00 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=71.171.111.51; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 71.171.111.51 References: <40d568da-4715-42de-8e28-98da39a5c974@googlegroups.com> <34f499f7-020f-4dcc-adad-0ab1113386d1@googlegroups.com> <9d69e7b5-6b2d-4607-9f7b-affa78c41620@googlegroups.com> <41c711cb-0300-4a41-93d3-e69297ae1945@googlegroups.com> <42de4aa3-9e7c-44b8-aa84-712cc7ce03c6@googlegroups.com> <9b6b6f10-5956-4a19-83f5-c1c015c62602@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Visibility of Indexing aspects From: Jere Injection-Date: Fri, 20 Jul 2018 22:07:00 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:53923 Date: 2018-07-20T15:07:00-07:00 List-Id: On Friday, July 20, 2018 at 12:11:13 PM UTC-4, AdaMagica wrote: > Am Freitag, 20. Juli 2018 14:08:11 UTC+2 schrieb Jere: > > I was under the impression that scope and visibility were two different > > things. If I understand you correctly, it sounds like you are saying > > that > > > > package Things is > > --One scope > > private > > --another scope > > end Things; > > > > I was under the impression that it was more like: > > > > package Things is > > --One scope > > private > > --same scope but different visibility > > end Things; > > The scope of every declaration start with the place of the declaration, so in a package or any declarative region, there are many scopes, some of which are visible, others not. I think my confusion comes from being taught that the word scope has a particular connotation. Normally a scope exists between two scoping points ({and } in C/C++, declare/begin and end in Ada and similar languages). Based on this discussion though, it seems like Ada has a different definition that instead starts a an item's specific point of declaration correct? > > > Also how does this reconcile with: > > > > 8.3 (23.1/3): > > An attribute_definition_clause or an aspect_specification is > > visible everywhere within its scope. > > > > That section makes it sound like aspects created in the private > > section are indeed visible in the public section. > > Why do you think so? based on my own confusion mentioned above. I think I get it now though. > > > Couple that with the section you mentioned: > > > > 8.2(10.1/3) The scope of an aspect_specification is identical to > > the scope of the associated declaration. > > "associated" means the declaration (syntax) in which it appears. This is here in the private part in the full declaration, so it's *not* visible in the public part. > Question: Section 13.1.3 (1/3) says "The declaration with the aspect_specification is termed the associated declaration." In the case of the bugged example I gave, the aspect_specification was with the full view of the type. Is that then considered the declaration of the type, or is just the partial view in the public section considered the declaration? I am assuming the full view is still considered the declaration. > BTW: You should definitely report this severe bug to AdaCore. I'll see if I can figure out a way to word this. As you can see, I am not super competent in the RM, so I'm not sure I will be able to prove to them it is one. I'm not a paying customer (would like to be, but they are out of my price range), so I normally don't send them bug reports unless I really can show a verified bug.