From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!g7g2000prg.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Dispatch on the result still does not work? Date: Mon, 13 Jul 2009 09:55:39 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4a58dfcf$0$30232$9b4e6d93@newsspool1.arcor-online.net> <1rfyxeircfmy1.19a1j3vqyttbo$.dlg@40tude.net> <74j6m.69502$rO.69160@newsfe13.ams2> <1u2c96ysoamp2.1vn3copqwfld7$.dlg@40tude.net> <874fde27-bd71-4d8b-adad-072817790373@d34g2000vbm.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1247504139 6897 127.0.0.1 (13 Jul 2009 16:55:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 13 Jul 2009 16:55:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: g7g2000prg.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7032 Date: 2009-07-13T09:55:39-07:00 List-Id: On Jul 12, 1:30=A0pm, sjw wrote: > On Jul 12, 6:11=A0pm, AdaMagica wrote: > > > =A0 X : T'Class :=3D S'(Value); > > begin > > =A0 =A0X :=3D 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 > =A0 =A0X : P.T'Class :=3D P.S'(P.Value); > begin > =A0 =A0X :=3D P.T'(P.Value); > > but this fails > > procedure Q is > =A0 =A0X : P.T'Class :=3D P.T'(P.Value); > begin > =A0 =A0X :=3D 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