comp.lang.ada
 help / color / mirror / Atom feed
From: Javier Miranda <jmiranda@iuma.ulpgc.es>
To: Yves Bailly <kafka.fr@laposte.net>
Cc: comp.lang.ada@ada-france.org
Subject: Re: Trouble with overriding and class-wide parameters
Date: Sun, 16 Jul 2006 06:00:05 -0400
Date: 2006-07-16T12:29:01+02:00	[thread overview]
Message-ID: <mailman.29.1153045476.30988.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <44b91f16$0$27041$626a54ce@news.free.fr>


On Jul 15, 2006, at 1:00 PM, Yves Bailly wrote:

> Here's a problem I'm encountering, while developping a (rather
> huge) library using Ada 2005, for now using only the latest GNAT
> GPL compiler from AdaCore (i.e. GNAT-2006).
>
...
>
> I would expect the call to Setup() to invoke the Sub_Pkg.Setup()
> procedure, as "st" is of type Sub_Type. However the procedure
> actually called is Pkg.Setup(), as shown by the output :
> Pkg.Setup(Some_Type)
>
> What am I missing? I suspect the value "null" to be part of this,
> but I can't find a workaround.

This is a bug in the implementation of the Object.Operation notation
in the compiler because your call to Setup should be diagnosed as
ambiguous by the frontend.

The workaround is just to use the Ada95 procedural notation (instead
of the Ada 2005 object.operation notation). That is:

     Setup(st, null);

We take care of fixing this problem in the next release of the
compiler.

Regards,

---- Javier Miranda



  parent reply	other threads:[~2006-07-16 10:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-15 17:00 Trouble with overriding and class-wide parameters Yves Bailly
2006-07-15 18:00 ` Dmitry A. Kazakov
2006-07-15 18:20   ` Yves Bailly
2006-07-15 19:12     ` Dmitry A. Kazakov
2006-07-15 18:52 ` Jeffrey R. Carter
2006-07-15 20:03   ` Yves Bailly
2006-07-16  0:20     ` Jeffrey R. Carter
2006-07-16 10:00 ` Javier Miranda [this message]
2006-07-16 12:11   ` Ludovic Brenta
2006-07-16 13:36     ` Javier Miranda
replies disabled

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