comp.lang.ada
 help / color / mirror / Atom feed
* Problem with controlled types
@ 1998-12-14  0:00 bourguet
  1998-12-14  0:00 ` Matthew Heaney
  1998-12-14  0:00 ` Robert A Duff
  0 siblings, 2 replies; 6+ messages in thread
From: bourguet @ 1998-12-14  0:00 UTC (permalink / raw)


I've found a CD with Aonix ObjectAda 7.1 Special Edition and tried to
compile a program developped under gnat 3.10. I failed due to the
number of units limitation of the Special Edition :-( but in the
process I found and removed some gnat dependancies. There where place
I had put these dependancies knowingly (like using the os_lib package,
I understand Ada stream better now). But the following one is, IMHO,
the result of bugs in one of the compilers, probably gnat but I prefer
to ask here before report the problem.

with ada.finalization;

package Pkg is

   type A is private;
   --  operations on B

   type B is private;

   function Get_B (I: A) return B;
   -- other operations on B

private

  type A is new Ada.Finalization.Controlled with record
     ...
  end record;

  type B is new Ada.Finalization.Controlled with record
     ...
  end record;

end pkg;

ObjectAda complain that the Get_B function is primitive on two tagged
types, and that is not allowed.

Gnat compile and run correctly (as A'Class contains only A and
B'Class only B, this is not strange).

Now, which one is correct?

-- Jean-Marc

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-12-14  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-14  0:00 Problem with controlled types bourguet
1998-12-14  0:00 ` Matthew Heaney
1998-12-14  0:00   ` Tom Moran
1998-12-14  0:00   ` Tucker Taft
1998-12-14  0:00     ` Robert I. Eachus
1998-12-14  0:00 ` Robert A Duff

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