comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam@spam.com>
Subject: Re: Dispatching operations
Date: Tue, 08 Nov 2005 16:15:29 GMT
Date: 2005-11-08T16:15:29+00:00	[thread overview]
Message-ID: <Ba4cf.1331$Xo.933@newsread2.news.pas.earthlink.net> (raw)
In-Reply-To: <dkq1gf$2sv$1@sunnews.cern.ch>

Maciej Sobczak wrote:

> My confusion is that Op_B is private in P2. X is declared in P2 as well. 
> In the above call, I'd expect P2.Op_B to be called (which is actually 
> the case), but since everything is known statically, then I'd expect as 
> well to get compile-time error due to the fact that P2.Op_B is private.

The important point is in 20.f: "The overriding declaration for P2.Op_B is not 
visible in Main, so the name in the call actually denotes the implicit 
declaration of Op_B inherited from T1."

Note that there is an implicit declaration of Op_B in P2 at the point of the 
type extension.

Also note that X is not declared in P2; it is declared in Main.

-- 
Jeff Carter
"My brain hurts!"
Monty Python's Flying Circus
21



  parent reply	other threads:[~2005-11-08 16:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08 11:17 Dispatching operations Maciej Sobczak
2005-11-08 12:06 ` christoph.grein
2005-11-08 16:15 ` Jeffrey R. Carter [this message]
2005-11-09  8:38   ` Maciej Sobczak
2005-11-09 22:28     ` Jeffrey R. Carter
replies disabled

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