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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,668255690a14abb2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-20 11:05:03 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!proxad.net!oleane.net!oleane!nnrp.oleane.net!not-for-mail From: "Jean-Pierre Rosen" Newsgroups: comp.lang.ada Subject: Re: Compiler complaint legal? Date: Wed, 20 Jun 2001 20:02:46 +0200 Organization: Adalog Message-ID: <9gqogs$iii$1@s1.read.news.oleane.net> References: NNTP-Posting-Host: mailhost.axlog.fr X-Trace: s1.read.news.oleane.net 993060188 19026 195.25.228.57 (20 Jun 2001 18:03:08 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Wed, 20 Jun 2001 18:03:08 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:8930 Date: 2001-06-20T20:02:46+02:00 List-Id: "Ted Dennison" a �crit dans le message news: Lo5Y6.2832$yp1.84754@www.newsranger.com... > In article , M. A. Alves > says... > > > >Package O defines type O. GNAT does not recognize the type here: > > > >with O; use O; > >procedure O_Test is > > Object: O; -- HERE > > I don't believe you can have packages and types with the same name in the same > scope. Under the circumstances, I'd want to keep the package name. Yes you can. However, the main rule is that something is use-visible only if it does not conflict with a name that would be otherwise visible. Therefore, O designates the package (which is directly visible) and not the type (which is only use-visible). > You should probably aviod naming things the same as their enclosing package. Certainly >On > the other hand, this is yet another reason to aviod the use clause. Certainly not. The use clause has no effect in that case: when there is any risk of ambiguity, it nicely steps back. The "O" is the same if there were no use clause. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr