Interfaces and private types
- From: Philippe Tarroux <philippe.tarroux@xxxxxxxx>
- Date: Mon, 28 Jan 2008 18:16:38 +0100
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
.
- Follow-Ups:
- Re: Interfaces and private types
- From: Randy Brukardt
- Re: Interfaces and private types
- From: Georg Bauhaus
- Re: Interfaces and private types
- Prev by Date: Re: Default array base index
- Next by Date: Re: What is the best way to define the Imported C function
- Previous by thread: Concurrency and interfaces
- Next by thread: Re: Interfaces and private types
- Index(es):
Relevant Pages
|