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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,79d82904f3b7ef79,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!q69g2000hsb.googlegroups.com!not-for-mail From: adam.betts155@gmail.com Newsgroups: comp.lang.ada Subject: "limited with" packages Date: Wed, 20 Jun 2007 06:20:13 -0700 Organization: http://groups.google.com Message-ID: <1182345613.667367.212750@q69g2000hsb.googlegroups.com> NNTP-Posting-Host: 85.118.3.38 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1182345613 21701 127.0.0.1 (20 Jun 2007 13:20:13 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 20 Jun 2007 13:20:13 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: q69g2000hsb.googlegroups.com; posting-host=85.118.3.38; posting-account=XCgU6Q0AAADnvDnlqBR5Sijc4OfKVWs2 Xref: g2news1.google.com comp.lang.ada:16268 Date: 2007-06-20T06:20:13-07:00 List-Id: I have the following code: --------------------------------------------------------------------------------------------------------------------------- with my_package; use my_package; package other_package is type type_one (<>) is private; type type_one_pointer is access constant type_one'class; function create (t_2: type_two'class) return type_one'class; ........ end other_package; --------------------------------------------------------------------------------------------------------------------------- limited with other_package; package my_package is type type_two is private; function get_type_one (t_2: type_two'class) return other_package.type_one_pointer; ......... end my_package --------------------------------------------------------------------------------------------------------------------------- package body my_package is function get_type_one (t_2: type_two'class) return other_package.type_one_pointer is t_one_ptr : other_package.type_one_pointer; begin t_one_ptr := new other_package.type_one'class'( other_package.create(t_2) ); end get_type_one; end my_package; --------------------------------------------------------------------------------------------------------------------------- However, I'm getting the error:"create" not declared in "other_package" which I do not understand as it does not complain about the types (type_one and type_one_pointer). Maybe it is my misunderstanding of the "limited with" clause. Any help much appreciated.