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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1e514fb9f9333128,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-11 10:21:54 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 402450@cepsz.unizar.es (Jano) Newsgroups: comp.lang.ada Subject: Problem with access types using Booch components. Date: 11 Feb 2003 10:21:53 -0800 Organization: http://groups.google.com/ Message-ID: <5d6fdb61.0302111021.73b4bc4a@posting.google.com> NNTP-Posting-Host: 80.58.47.42 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1044987714 10650 127.0.0.1 (11 Feb 2003 18:21:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 11 Feb 2003 18:21:54 GMT Xref: archiver1.google.com comp.lang.ada:33999 Date: 2003-02-11T18:21:54+00:00 List-Id: Hello, I'm trying to use these and I've come across this problem. Say I have a Collection type completely instantiated: subtype Collection_x is Abstract_x_collections.Collection; and I define type Collection_x_access is access all Collection_x; Now I have a C: Collection_x; C_access: Collection_x_access:= C'access; All works well until I try to create an iterator: first try: it: Iterator:= New_iterator(C_access.all); <-- it raises tag error inside some booch source. second try: it: Iterator:= New_iterator(Collection_x(C_access.all)); <-- same as above. third try: C_bis: Collection_x:= C_access.all; it: Iterator:= New_iterator(C_bis); <-- It works!! I would go with the first option. I'm 99% sure that I'm calling the proper functions in the proper packages, but if anyone demands it, I can post a more detailed example with actual code. What's happening?? (In a side note, in the first of the three calls, if I replace C_access.all by C_access (yes!), Gnat compiles without complaint...) Regards, Alex.