comp.lang.ada
 help / color / mirror / Atom feed
* Abstract realizations can't be inherited??
@ 1998-08-27  0:00 dennison
  1998-08-27  0:00 ` Tucker Taft
  1998-08-27  0:00 ` dewar
  0 siblings, 2 replies; 8+ messages in thread
From: dennison @ 1998-08-27  0:00 UTC (permalink / raw)


I had a situation today where I wanted to declare a new tagged type which is
very similar to an existing one I had. Ahh, classic OO. I just derive it from
the existing type, and redefine the one operation that changed, right? Wrong!

The existing type's operations that I wanted to inherit are overrides of
abstract subprograms inherited from its parent type. The compiler blows up
and points to 3.9.3(6), which appears to say that I have to explicitly
override every abstract subprogram any "ancestor" type has. That means that
if a type is declared abstract, none of the "standard" operations you declare
for it can ever be inherited! What on earth is the logic behind that
restriction?

--
T.E.D.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-27  0:00 Abstract realizations can't be inherited?? dennison
1998-08-27  0:00 ` Tucker Taft
1998-08-28  0:00   ` dennison
1998-08-29  0:00     ` Tucker Taft
1998-08-31  0:00       ` dennison
1998-08-31  0:00         ` Tucker Taft
1998-08-31  0:00           ` dennison
1998-08-27  0:00 ` dewar

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