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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9afe16648c0a7435 X-Google-Attributes: gid103376,public From: Larry Subject: Re: Problem Compiling with GNAT Date: 1999/03/16 Message-ID: <7clnqq$3m1$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 455609229 References: <7cj6nt$rvh$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x2.dejanews.com:80 (Squid/1.1.22) for client 136.205.149.47 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Tue Mar 16 13:54:38 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; U) Date: 1999-03-16T00:00:00+00:00 List-Id: In article <7cj6nt$rvh$1@nnrp1.dejanews.com>, Larry wrote: > There is a type named Class in many packages and in one procedure the compiler > seems to be confused about which Class is used. Here is abbreviated code for > that procedure: > > procedure Display (Next_Timed_Fire_Mission : in Fire_Missions.Class; > Next_Non_Timed_Fire_Mission : in Fire_Missions.Class) is > > -- Fire_Missions.Class is a private record type. > > use Fire_Missions.Operators; > Not_Used : Boolean; > begin > > if Next_Timed_Fire_Mission_Gui.Item_Of > /= Next_Timed_Fire_Mission then > -- ^ Error messages point to this line > Next_Timed_Fire_Mission_Gui.Set (Next_Timed_Fire_Mission); > > if Next_Timed_Fire_Mission = Fire_Missions.Null_Value then > > Display_This_Gui (This_Gui => > Next_Timed_Fire_Mission_Gui.Clear_Display, > Continue => Not_Used); > else > Display_Next_Timed_Fire_Mission_Gui; > end if; > > end if; > end Display; > > This version gives the error messages: > > expected type "Location_Data.Class" defined at location_data.ads:100 > found type "Firing_Points.Class" defined at firing_points.ads:57 > > If I comment out the use Fire_Missions.Operators; statement, I get: > > operator for private type "Class" defined at fire_missions.ads:166 > is not directly visible > use clause would make operation legal This has generated some good discussion but no answers yet. I got an email from Robert Dewar "strongly" suggesting support from ACT and I'm working on that but it's not going to happen quickly. If you look at the error messages, you will see that the compiler finds the correct "Class" for the comparison without the use clause but finds 2 other types with the use clause. This is what has me confused. It is now even more confusing. I edited all definitions and references to Fire_Missions.Class to be Fire_Missions.Claxx. There was no change in the error messages other than the name change in the second set. With the use clause, GNAT still complains about "Location_Data.Class" and "Firing_Points.Class". -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own