comp.lang.ada
 help / color / mirror / Atom feed
From: evangeli@cnam.fr
Subject: on the use of "limited with"
Date: 8 Oct 2005 06:45:32 -0700
Date: 2005-10-08T06:45:32-07:00	[thread overview]
Message-ID: <1128779132.336469.160360@z14g2000cwz.googlegroups.com> (raw)

hello,
i recently downloaded gnat gpl and tested the new Ada 05 feature
"limited with"
here are two packages which defines two types:

limited with q;
package p is
   type tp_record is private;
   type tp is access all tp_record;
   function get_q(my_tp : in tp) return q.tq;
private
   type tp_record is record ... end record;
end p;
--=====================================--
limited with p;
package q is
   type tq_record is private;
   type tq is access all tq_record;
   function get_p(my_tq : in tq) return p.tp;
private
   type tq_record is record ... end record;
end q;

i naturally get the following errors:
p.ads:5:42: invalid use of incomplete type

q.ads:5:42: invalid use of incomplete type

my question is the following: is there a way to declare p and q in two
separate packages?




             reply	other threads:[~2005-10-08 13:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-08 13:45 evangeli [this message]
2005-10-09  7:42 ` on the use of "limited with" Martin Dowie
2005-10-09 11:19   ` evangeli
2005-10-09 13:12     ` Martin Dowie
2005-10-11  0:12     ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox