comp.lang.ada
 help / color / mirror / Atom feed
From: Philippe Tarroux <philippe.tarroux@limsi.fr>
Subject: Interfaces and private types
Date: Mon, 28 Jan 2008 18:16:38 +0100
Date: 2008-01-28T18:16:38+01:00	[thread overview]
Message-ID: <fnl2in$k49$1@news2.u-psud.fr> (raw)

Hi again,

There is no compilation problem with the following code :

package Test_Interfaces is
  
   type Int is synchronized interface;
   procedure Init (I : in out Int) is abstract;
  
   type T is new Int with private;
  
private
  
   task type T is
      entry Init;
   end T;
end Test_Interfaces;

but, in a main program when I declare an object (i can't see it is a 
task) of type T, the compiler tells me that Init must be overriden. It 
is of course overriden by the entry of the task which is not explicitly 
visible. Having to provide Init explicitly prevents to hide the type of 
T although the syntax of the call (Obj.Init) is the same for a task 
entry or a procedure.

Does anybody know if there is a reason why in this case one cannot admit 
that Init is implicitly defined?

Philippe Tarroux




             reply	other threads:[~2008-01-28 17:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-28 17:16 Philippe Tarroux [this message]
2008-01-28 18:21 ` Interfaces and private types Georg Bauhaus
2008-01-28 22:58 ` Randy Brukardt
2008-01-29  9:35   ` Philippe Tarroux
2008-01-29 12:48     ` Georg Bauhaus
2008-01-29 13:08       ` Philippe Tarroux
2008-01-29 23:29     ` 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