From: aio!qbe.jsc.nasa.gov!dean@eos.arc.nasa.gov (Jack Dean)
Subject: Re: Is this valid Ada?
Date: 8 Nov 91 13:31:13 GMT [thread overview]
Message-ID: <1991Nov8.133113.6222@aio.jsc.nasa.gov> (raw)
In article <37806@shamash.cdc.com>, case@shamash.cdc.com (Steven V. Case) write
s:
|>
|> Anyone care to offer an opinion?
|>
|> ----------------------------------------
|>
|> PACKAGE Ambiguous_Type IS
|>
|> TYPE Is_This_Ambiguous IS NEW Integer;
|>
|> END Ambiguous_Type;
|>
|> ----------------------------------------
|>
|> WITH Ambiguous_Type; USE Ambiguous_Type;
|>
|> PROCEDURE Test IS
|>
|> PROCEDURE Is_This_Ambiguous IS
|> BEGIN
|> NULL;
|> END Is_This_Ambiguous;
|>
|> BEGIN
|>
|> Is_This_Ambiguous;
|>
|> END Test;
|>
The way I read 8.7 of the LRM, this should be legal. The potential
problem stems from the overloading of of Is_This_Ambiguous. One possible
resolution is the parameterless procedure Test.Is_This_Ambiguous. The
other possible resoulution is the implicit conversion function
Ambiguous_Type.Is_This_Ambiguous, which takes a parameter of type
Integer, and returns a result of type Ambiguous_Type.Is_This_Ambiguous.
Now clearly the syntax rules and the parameter profile rules eliminate
this second resolution. Since there is only one valid interpretation,
the use of the overloaded entity is legal.
--
Jack Dean dean@sweetpea.jsc.nasa.gov
next reply other threads:[~1991-11-08 13:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1991-11-08 13:31 Jack Dean [this message]
-- strict thread matches above, loose matches on Subject: below --
1991-11-08 20:53 Is this valid Ada? csn!news.den.mmc.com!possum.den.mmc.com!dow
1991-11-08 15:43 Bill Yow
1991-11-08 5:14 cis.ohio-state.edu!magnus.acs.ohio-state.edu!paperboy.micro.umn.edu!cs.um
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox