comp.lang.ada
 help / color / mirror / Atom feed
* Interfaces and private types
@ 2008-01-28 17:16 Philippe Tarroux
  2008-01-28 18:21 ` Georg Bauhaus
  2008-01-28 22:58 ` Randy Brukardt
  0 siblings, 2 replies; 7+ messages in thread
From: Philippe Tarroux @ 2008-01-28 17:16 UTC (permalink / 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




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

end of thread, other threads:[~2008-01-29 23:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-28 17:16 Interfaces and private types Philippe Tarroux
2008-01-28 18:21 ` 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

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