comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Dispatch on the result still does not work?
Date: Mon, 13 Jul 2009 09:55:39 -0700 (PDT)
Date: 2009-07-13T09:55:39-07:00	[thread overview]
Message-ID: <a1e78b0a-578e-4f79-ae64-528675a9a4a3@g7g2000prg.googlegroups.com> (raw)
In-Reply-To: 874fde27-bd71-4d8b-adad-072817790373@d34g2000vbm.googlegroups.com

On Jul 12, 1:30 pm, sjw <simon.j.wri...@mac.com> wrote:
> On Jul 12, 6:11 pm, AdaMagica <christoph.gr...@eurocopter.com> wrote:
>
> >   X : T'Class := S'(Value);
> > begin
> >    X := Value; -- Ambiguous?
>
> > You know, I'm not a language lawyer, but after the initialization, X
> > is constrained to the tag with which it was initialized.
>
> > So to me, it should be dispatching as Dmitry expects.
>
> I think GNAT GPL 2009 might just have a problem in this area: this is
> accepted
>
> procedure Q is
>    X : P.T'Class := P.S'(P.Value);
> begin
>    X := P.T'(P.Value);
>
> but this fails
>
> procedure Q is
>    X : P.T'Class := P.T'(P.Value);
> begin
>    X := P.S'(P.Value);
>
> saying 'tag-indeterminate expression must have type "T"(RM 5.2 (6))'

No, that's not a GNAT problem.  The RM paragraph, which GNAT was good
enough to tell you about, specifically says that a tag-indeterminate
expression must have type T in this case.  I kind of think that if a
GNAT error message refers to a specific RM passage, it's probably a
good idea to read that passage before assuming there's a GNAT
problem.....

                               -- Adam




  reply	other threads:[~2009-07-13 16:55 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-11 10:04 Dispatch on the result still does not work? Dmitry A. Kazakov
2009-07-11 11:09 ` Chris Moore
2009-07-11 12:05   ` Dmitry A. Kazakov
2009-07-11 17:50     ` Chris Moore
2009-07-11 19:22       ` Dmitry A. Kazakov
2009-07-11 11:32 ` Hibou57 (Yannick Duchêne)
2009-07-11 12:20   ` Dmitry A. Kazakov
2009-07-11 13:36     ` Hibou57 (Yannick Duchêne)
2009-07-11 13:39       ` Hibou57 (Yannick Duchêne)
2009-07-11 15:19       ` Dmitry A. Kazakov
2009-07-11 18:08         ` Hibou57 (Yannick Duchêne)
2009-07-11 19:29           ` Dmitry A. Kazakov
2009-07-11 23:22             ` Hibou57 (Yannick Duchêne)
2009-07-12  9:46               ` Dmitry A. Kazakov
2009-07-11 18:54 ` Georg Bauhaus
2009-07-11 19:40   ` Dmitry A. Kazakov
2009-07-12 10:40     ` Chris Moore
2009-07-12 11:30       ` Dmitry A. Kazakov
2009-07-12 16:05         ` Chris Moore
2009-07-12 16:38           ` Dmitry A. Kazakov
2009-07-12 17:11             ` AdaMagica
2009-07-12 20:30               ` sjw
2009-07-13 16:55                 ` Adam Beneschan [this message]
2009-07-13 21:47                   ` sjw
2009-07-13 22:50                     ` Adam Beneschan
2009-07-14 21:06                       ` sjw
2009-07-13 15:13 ` Adam Beneschan
2009-07-13 15:17   ` Adam Beneschan
2009-07-13 16:33     ` AdaMagica
2009-07-13 18:46   ` Adam Beneschan
replies disabled

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