comp.lang.ada
 help / color / mirror / Atom feed
* Primitive Operations Question
@ 1996-07-30  0:00 Vance Christiaanse
  1996-07-31  0:00 ` Samuel Tardieu
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Vance Christiaanse @ 1996-07-30  0:00 UTC (permalink / raw)



Hello!

Much to my dismay, the following procedure compiles on the WebAda
(GNAT 3.04) compiler.  By my reading of RM95 3.2.3, A and B don't
fit any part of the definition of primitive operations, so I
don't see why iheritance seems to be occurring.  When I replace
all three types with a hierarchy of tagged types, both calls
fail to compile, as I would have expected.

Any insight would be much appreciated.

Thanks,

Vance Christiaanse
Cintech Consulting
cintech@ix.netcom.com


procedure Example is

  type My_Digit is range 0..7;
  procedure A (V : My_Digit);

  type New_Digit is new My_Digit;  -- is A inherited???

  procedure B (W : New_Digit);

  N : New_Digit := 1;

  type Newer_Digit is new New_Digit;  -- is B inherited???

  M : Newer_Digit := 1;

  procedure A (V : My_Digit) is
  begin
    null;
  end A;

  procedure B (W : New_Digit) is
  begin
    null;
  end B;

begin

   A(N);

   B(M);

end Example;




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

end of thread, other threads:[~1996-08-01  0:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-30  0:00 Primitive Operations Question Vance Christiaanse
1996-07-31  0:00 ` Samuel Tardieu
1996-07-31  0:00 ` Tucker Taft
1996-07-31  0:00 ` Robert A Duff
1996-07-31  0:00   ` Vance Christiaanse
1996-08-01  0:00     ` Robert A Duff
1996-08-01  0:00       ` Vance Christiaanse
1996-07-31  0:00 ` Jon S Anthony
1996-08-01  0:00 ` Jon S Anthony
1996-08-01  0:00   ` Robert A Duff

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