comp.lang.ada
 help / color / mirror / Atom feed
From: ica2ph@alpha1.csv.ica.uni-stuttgart.de (Peter Hermann)
Subject: Re: argument of conversion cannot be an allocator
Date: 1997/05/14
Date: 1997-05-14T00:00:00+00:00	[thread overview]
Message-ID: <5lcc8u$2mkc@info4.rus.uni-stuttgart.de> (raw)
In-Reply-To: 5lbccj$7vk$1@goanna.cs.rmit.edu.au


Dale Stanbrough (dale@goanna.cs.rmit.EDU.AU) wrote:
: I came across the following problem...

: 	type a is tagged private;
: 	type a_ptr is access all a'class;
: 	
: 	type b is new a with private;
: 	type b_ptr is acces all b'class;
: 	
: 	...
: 	
: 	return a'(new b);

This compiled:

PROCEDURE Dale IS

   type a is tagged null record;
   type a_ptr is access all a'class;

   type b is new a with
      record
         bcomp : integer := 0;
      end record;

   function fu return a_ptr is
   begin
      return new b; -- (i.e. newbee)
   end fu;

BEGIN
                 null;
END Dale ;

or else I possibly misunderstood you ?

--
Peter Hermann  Tel:+49-711-685-3611 Fax:3758 ph@csv.ica.uni-stuttgart.de
Pfaffenwaldring 27, 70569 Stuttgart Uni Computeranwendungen
Team Ada: "C'mon people let the world begin" (Paul McCartney)




  reply	other threads:[~1997-05-14  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-14  0:00 argument of conversion cannot be an allocator Dale Stanbrough
1997-05-14  0:00 ` Peter Hermann [this message]
1997-05-16  0:00 ` Dale Stanbrough
1997-05-16  0:00   ` Robert Dewar
1997-05-17  0:00 ` John G. Volan
replies disabled

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