From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 8 Nov 91 13:31:13 GMT From: aio!qbe.jsc.nasa.gov!dean@eos.arc.nasa.gov (Jack Dean) Subject: Re: Is this valid Ada? Message-ID: <1991Nov8.133113.6222@aio.jsc.nasa.gov> List-Id: 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