comp.lang.ada
 help / color / mirror / Atom feed
From: Tom Moran <tmoran@bix.com>
Subject: preventing inheritance
Date: 1996/12/13
Date: 1996-12-13T00:00:00+00:00	[thread overview]
Message-ID: <32B22CDC.3FE4@bix.com> (raw)


Given
type T is tagged ...
procedure A(X:T)
function  B(X:T) return ...
procedure C(X:T)
  and
Type U is new T with ...
procedure D(X:T)
procedure E(X:T)
function  F(X:T) return ...

  BUT
B(X:U) is, for reasons beyond my control, illegal.

  What is the best way to prevent/catch B(X:U)?

Currently I replace the inherited B(X:U) with
function  B(X:U) return ... is
begin
  raise this_is_a_no_no;
  return 0; -- all functions need at least one return
end B;




             reply	other threads:[~1996-12-13  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-13  0:00 Tom Moran [this message]
1996-12-16  0:00 ` preventing inheritance Norman H. Cohen
1996-12-16  0:00   ` Tom Moran
1996-12-16  0:00     ` Tom Moran
1996-12-17  0:00       ` Larry Kilgallen
1996-12-18  0:00       ` Norman H. Cohen
1996-12-18  0:00         ` Tom Moran
1996-12-19  0:00     ` Robert I. Eachus
replies disabled

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