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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d19c32d21e3a7992 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-21 12:19:34 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!jussieu.fr!enst!enst.fr!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: Access type scope Date: Sat, 21 Jul 2001 14:19:03 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: <90427822.0107200754.4f786f7@posting.google.com> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 995743172 59312 137.194.161.2 (21 Jul 2001 19:19:32 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Sat, 21 Jul 2001 19:19:32 +0000 (UTC) Cc: To: Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:10411 Date: 2001-07-21T14:19:03-05:00 You need to declare your type extension at library level e.g., in a package or in a library-level subprogram, instead of in a procedure nested within a library-level procedure. ----- Original Message ----- From: "Lin" Newsgroups: comp.lang.ada To: Sent: July 20, 2001 10:54 AM Subject: Access type scope > When I compile the main program below, the error message is "type > extension at deeper accessibility level than parent". How can I deal > with it if I need the extension? Any clues about it? Many Thanks. > > --Lin > > -------------------------------- > with System.RPC; use System.RPC; > with test; > procedure main is > procedure Fred(Y: access Params_Stream_Type) is > type APS is access all System.RPC.Params_Stream_Type; > type msg_type is new test.Msg_Type with > record > params : APS; > end record; > X : APS; > Msg : msg_type; > begin > Msg := ( > test.Msg_Type with > params => APS (Y)); > X := APS(Y); > end Fred; > PS : aliased Params_Stream_Type(0); > begin > Fred(PS'access); > end main; > > with System.RPC; > package test is > type Msg_Type is tagged > record > From_Par_Id : System.RPC.Partition_ID; > end record; > end test; > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada >