comp.lang.ada
 help / color / mirror / Atom feed
* Another problem with "interface"
@ 2009-02-16  9:53 Robert_Matthews
  2009-02-16 10:26 ` christoph.grein
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Robert_Matthews @ 2009-02-16  9:53 UTC (permalink / raw)


In using interface types with GNAT I have encountered another problem.
Consider the following package:

package Test is

   type A_Type is limited interface;

   procedure P (A : in out A_Type; D : Integer) is abstract;

   protected type New_A_Type is new A_Type
   with
      procedure P (D : Integer);
      --  other subprograms...
   private
      F : Integer;
   end New_A_Type;

   function Set_A return New_A_Type;

end Test;

GNAT gives an error for the function Set_A: 
"operation can be dispatching in only one type",
which leaves me mystified. Am I making another
dumb mistake? Please help!

The version of GNAT is GNAT GPL 2008 (20080521).

Thanks in advance,

Robert




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

end of thread, other threads:[~2009-02-17 16:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-16  9:53 Another problem with "interface" Robert_Matthews
2009-02-16 10:26 ` christoph.grein
2009-02-16 10:40   ` Georg Bauhaus
2009-02-16 11:27     ` Robert_Matthews
2009-02-16 11:45       ` Egil Høvik
2009-02-16 11:54     ` christoph.grein
2009-02-16 13:29 ` Dmitry A. Kazakov
2009-02-16 13:56   ` Georg Bauhaus
2009-02-17 16:28 ` Robert_Matthews

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