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.157.16.39 with SMTP id h36mr20205649ote.95.1483617248687; Thu, 05 Jan 2017 03:54:08 -0800 (PST) X-Received: by 10.157.17.3 with SMTP id g3mr3623691ote.8.1483617248658; Thu, 05 Jan 2017 03:54:08 -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!b123no521161itb.0!news-out.google.com!g131ni8193itg.0!nntp.google.com!b123no520477itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 5 Jan 2017 03:54:08 -0800 (PST) In-Reply-To: <70f79da7-018c-48a3-bf3d-79da0e871a72@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=194.154.216.92; posting-account=sDyr7QoAAAA7hiaifqt-gaKY2K7OZ8RQ NNTP-Posting-Host: 194.154.216.92 References: <29380aa7-0c3b-4908-94c6-aa91f3996b42@googlegroups.com> <70f79da7-018c-48a3-bf3d-79da0e871a72@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <82899644-11fc-4bf5-b055-f99917c797dc@googlegroups.com> Subject: Re: Experimenting with the OOP features in Ada From: Laurent Injection-Date: Thu, 05 Jan 2017 11:54:08 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:33067 Date: 2017-01-05T03:54:08-08:00 List-Id: On Wednesday, 4 January 2017 16:09:48 UTC+1, Shark8 wrote: > You're misunderstanding the errors -- they aren't about the keyword 'Tagged', > they're about the declaration itself. > > When you have "Type object [...]" everything after that hides package Object > you're withing. (Hence the compiler saying "type 'Object' cannot be used > before end of its declaration".) -- The solution is to _immediately_ after > "package Base_Types is" insert a line renaming package Object and then prefix > type object's derivation-definition with the rename. > > Example: > > With Object; > package Base_Types is > Package Obj_Rename renames Object; > > type Object is abstract new Obj_Rename.Object.Entity with private; > > > > > > That will take care of that error. > > Both proposed solutions work. Can't decide which one to choose. Hm yes had a fixation on the the tagged keyword. For a moment I was tempted to change the name of the type but couldn't find anything better than Object and abandoned. Instead of putting something else only to see if it makes a difference. Shouldn't the compiler then complain that there are 2 entities with the same name? Or a least give a warning that this could cause problems? Thanks Ps: does someone know of an language addon for BBEdit?