comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@ni.net (Matthew Heaney)
Subject: Re: QUIZ: To be or not to be (able to post)
Date: 1997/09/30
Date: 1997-09-30T00:00:00+00:00	[thread overview]
Message-ID: <mheaney-ya023680003009970443150001@news.ni.net> (raw)
In-Reply-To: 60n3dm$fhi$1@gonzo.sun3.iaf.nl


In article <60n3dm$fhi$1@gonzo.sun3.iaf.nl>, Geert Bosch
<geert@gonzo.sun3.iaf.nl> wrote:

>OK, here is a nice question for all you Ada experts out there.
>Why isn't the code below not legal? Or is it? If so, why?
>
>   with Ada.Numerics.Elementary_Functions;
>   procedure Renaming is
>
>      function Sin (F : Float) return Float;
>
>      function Sin (X : Float'Base) return Float'Base
>         renames Ada.Numerics.Elementary_Functions.Sin;
>
>   begin
>      null;
>   end Renaming;

Isn't this a "co-resident homograph"?  Float is a subtype of Float'Base,
and subtypes can't be used to resolve ambiguity.  Only types are part of a
signiture, not subtypes.

--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271




  parent reply	other threads:[~1997-09-30  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-29  0:00 QUIZ: To be or not to be (able to post) Geert Bosch
1997-09-30  0:00 ` Tucker Taft
1997-09-30  0:00 ` Matthew Heaney [this message]
1997-10-02  0:00 ` Joel VanLaven
1997-10-02  0:00   ` Tucker Taft
1997-10-02  0:00     ` Joel VanLaven
1997-10-03  0:00       ` Robert A Duff
replies disabled

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